-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/983/simple-menu-for-user-input/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
4 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
1 week ago · 2 comments
-
Gmail: How to block a sender from your inbox
3 weeks ago · 3 comments
-
Our first iPhone game GreenThumb available in the App Store
3 weeks ago · 2 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
===============
ERROR:
user-input.sh: line 7: syntax error near unexpected token `newline'
user-input.sh: line 7: `cat <'
=================
#!/bin/bash
## Clears the screen and builds the user input screen
function screen() {
clear
cat <<EOF
####################################################################
## Main Screen for Input ##
####################################################################
## ##
## User Name: [________________________________________] ##
## Directory: [________________________________________] ##
## Group: [________________________________________] ##
## ##
####################################################################
## [ Preferences ] [ Other Info ] ##
####################################################################
## [_] Show Email? [_] Receive News? ##
## [_] Show Address? [_] Receive RSS? ##
####################################################################
EOF
}
## This will echo out the contents of the helpString variable
## below the screen
function showHelp() {
tput cup 14 0
## Clear out the last information
echo " "
tput cup 14 0
echo $helpString
}
## Display the screen
screen
## Set up the help information, and call the showHelp function
## that displays it
helpString="Enter the user or press ENTER to quit"
showHelp
tput cup 4 15
read username
## If they don't enter a username, quit
if [ "$username" = "" ]
then
exit
fi
## Now go through and get the other data
helpString="Enter Home Directory"
showHelp
tput cup 5 15
read directory
helpString="What group does $username belong to?"
showHelp
tput cup 6 15
read group
helpString="Do you want to show the Email Address to others? [y/n"
showHelp
tput cup 11 4
read showEmail
helpString="Do you want to show your Home Address to others [y/n]"
showHelp
tput cup 12 4
read showAddress
helpString="Would you like to receive the News Letter?"
showHelp
tput cup 11 24
read getNews
helpString="Would you like to receive the RSS Feed?"
showHelp
tput cup 12 24
read getRSS
helpString="Thank you for your input"
showHelp
echo ""