Shell Scripting – Prompting for User Input.

Shell_25194_sm First off let me start out this post by stating that I am a pretty lousy scripter. I just have not taken the time to write a lot of scripts. So I have created a new Category called "Shell Scripting" and plan to do my best to keep adding little "scriptlets" whenever I can.


Prompting for user input

# echo -n "Enter your name and press [ENTER]:"
# read name
# echo -n "Enter your gender and press [ENTER]:"
# read -n 1 gender (read returns after 1 character is read)
# echo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.