Help - Search - Members - Calendar
Full Version: Need help writing a small script
Linuxhelp > Support > Programming in Linux
tiggertony
How do you write a basic shell script for the following requirments?

-Ask the user for his or her name
-Greet the user using that name
-Ask the user what to do
-If 'date' or time', print the date and the time.
-Else if 'where", print the name of the machine.
-Else if 'files', print a list of all files in the user's home directory
-Else print the user's search path.

Please help.
michaelk
There is a lot of information on the internet about bash programming. Most forums have a standard policy not to expect members to to your homework. We will help if you have a specific question or do not understand a particular command.

tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
tldp.org/LDP/abs/html/
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.