Quote:
Originally Posted by pixellany
You don't necessarily have to post the whole script---but you have to give us some kind of information. For example, when you refer to the first and second read, is this in a loop?
|
The script is stopping at the first read but is storing the entered value in the variable associated with the second read (ln).
The script does not stop and prompt you to enter the last name or address.
I am running the script on as server. I am connected thru secure-shell.
Logged in as 'oracle' user.
Here is a test script I have been working with:
1 read -p "enter first name " -a fn;
2 echo "fn is " $fn;
3
4 printf "\n";
5 read -p "enter last name " -a ln;
6 printf "\n";
7 echo "ln is " $ln;
8
9 printf "\n";
10 read -p "enter address " -a ad;
11 printf "\n";
12 echo "ad is " $ad;
13
14 exit
Here is the result:
enter first name john
fn is
enter last name
ln is john
enter address
ad is