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?
|