Help with script
I have to write a script for my Linux course, and I am clueless on where to go from here. I am doing and "if,then" script in the bash that when run, gives the user 5 choices to enter, and then the program executes the corresponding commands. I basically just do'nt know how to type the syntax properly. This is what my file looks like so far:
#!/bin/bash # # # System Info Menu # Enables user to view common system info without having to know the commands to do so. # Written by: Jacque Turnbow # Date written:4/16/05 # Modified:4/16/05 # # # Show the menu choices echo "___________________________________________________" echo "Menu" echo "___________________________________________________" echo "These are your choices?" echo "(1) The current date and time" echo "(2) All users currently logged into the system" echo "(3) The directory that you are currently working in" echo "(4) List of files and subdirectories contained in the current directory" echo "(5) Exit" echo "___________________________________________________" echo -n "Enter your choice number: " # Read choice entered Can someone show me how to set up the if then statements? |
here's a start: read the course book.
and here's a good quote: "Do not expect LQ members to do your homework - you will learn much more by doing it yourself." -- http://www.linuxquestions.org/rules.php Here -- if the coursebook sucks, try this: http://www.tldp.org/LDP/abs/html/ |
All times are GMT -5. The time now is 04:57 PM. |