Wednesday, 12 June 2013

Script show date in Backtrack

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

Script show date in Backtrack

No comments:

Post a Comment