The shell script for locking Terminal:
#!/bin/ksh
#scriptname:locktty
#writed by :javalee
#script start...
reset;clear
info="System will be locked!!! Press Waitting....."
print "\n\n\n\n\n\n\n"
for i in 9 8 7 6 5 4 3 2 1 0
do
print -n " \a$info$i\r"
sleep 1
done
clear
trapper () {
trap ' ' 2 3 20
}
while :
do
trapper
print "\n\n\n\n\n\n\n\n\t\t\tPlease enter unlock code:"
stty -echo
read input
case $input in
123)
print "\t\t Hello $USER,Today is $(date +%T)\n"
stty echo
break ;;
*)
clear
continue ;;
esac
done
#script end
Monday, August 17, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment