Get a variable from a user on command line, in the middle of a line
Hi Guys,
I'm making a program that requires a fair amount of user response. I'm trying to make something like the yum install bit, where it says: note that ______ is where the system is expecting a user to type in the variable. Code:
Is that ok? [Yes/No]: _____ Code:
echo "Is that ok? [Yes/No]:" Code:
Is that ok? [Yes/No]: |
Code:
echo -en "Is that ok? [Yes/No]: "; read |
Quote:
Is it the "n" switch that will make it work? |
or:
Code:
read -p "Is that correct: Yes/No " variable |
Quote:
Code:
c@CW8:~$ help echo |
All times are GMT -5. The time now is 07:59 AM. |