Mr. Bipin S. Rupadiya
[M.C.A.]
Graphics Designer, Freelancer
Assistant Professor, JVIMS-MCA College
Pages
(Move to ...)
Home
Publication
Privacy Policy
Contact Us
About Us
▼
Write a shell script to check whether the named user is currently logged in or not.
File Name : ex16.sh
clear
echo "Enter user name : \c"
read unm
unm1=$(who | cut -d " " -f 1)
if [ "$unm" = "$unm1" ]
then
echo " [ $unm ] is already Login"
else
echo " [ $unm ] is not Login"
fi
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment