5
public text v1 · immutable#!/bin/bash
echo -e "What would you like to see?
Todays' date \t\t\t(a)
Currently logged in users \t(b)
Contents of the / directory \t(c)
Enter your choice (a/b/c) ------> \c"
read ANSWER
if [ $ANSWER = "a" -o $ANSWER = "A" ]
then
echo -e "Todays date is: \c"
date
elif [ $ANSWER = "b" -o $ANSWER = "B" ]
then
echo -e "The peopled logged into the system are:"
who
elif [ $ANSWER = "c" -o $ANSWER = "C" ]
then
echo -e "\nThe contents of the directory are: "
ls -F /
fi