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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s