Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Need help writing a small script

Posted by: tiggertony Mar 26 2012, 07:12 PM

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.

Posted by: michaelk Mar 27 2012, 06:25 AM

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/

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)