Reputation: 22143
Suppose such a mininal example
$ read -p "Enter a numeral: "
Enter a numeral: 4
$ echo $REPLY
4
In the above, there's no variable listed, REPLY
be assigned to input automatically.
I'd like to list a variale like:
$ read foo -p "Enter a numeral: "
4
-bash: read: `-p': not a valid identifier
How to achieve it not invoking echo command?
Upvotes: 1
Views: 20