Script show date in Backtrack
Write
a script that displays about “Who is Logged In” and “Date”.
code
#!/bin/bash
Clear
echo " Script no.1 "
echo " ------------------------
"
echo " Command Menu "
echo " ------------------------
"
echo "PRESS 1 FOR Users"
echo "PRESS 2 FOR DATE"
echo "PRESS q FOR QUIT"
while test 1
do
read a
case $a in
1)
echo "Login Name: $(echo
$USER)"
who
;;
2)
echo "System date :
$(date)"
;;
q)
exit 0
;;
esac
done
Screen Shot
No comments:
Post a Comment