Keyboard input question

How would I change up a script that currently has something like:
bash script
echo what's 1 2 3 4?
then using read 1 2 3 4
I type 1 2 3 4.
so in the script i can do stuff like
echo $1 $2 $3 $4
and such...

i was just doing echo "1 2 3 4"|bash script

But was wondering how could I do something where I could execute the script and have it all on one line.
bash script 1 2 3 4

I've tried looking around and haven't had much luck, I just think I'm not finding the right term to search for. If someone could point me in the right direction please.

I don't understand this script, what does bash script do? You could put the echo on the same line with a semi-colon, ie,

bash script; echo "what's 1 2 3 4" 

Do you mean 1 2 3 4 to be options? If so I'd do

echo "Please type either a 1, 2, 3, or a 4"
read NUMBER
echo $NUMBER

Basically, I'm writing a script where I want some user input. However rather than when running the script it outputs:
Hi, what's variable 1 2 3?

then you type.
abc xyz 123

To get the variables in the script.

You can just type it out something like this.
bash script abc xyz 123

Can you post that section of your script?

Bash is a program and putting it all on one line as you seem to have done would run it with all those things as arguments to the bash command.

Just got it! :slight_smile:

Am setting up something to download some stuff with wget, move it around, fix perms etc...
I was using
echo "Enter Host User Pass : "
read host user pass

I needed:

host=$1
user=$2
pass=$3

It works for you then?