What is this script meant to do? How do I make it executable and how do i run it? I am trying to understand what the script is doing and how it is doing it... need a little advice. Here is is..
if [ -n "$user" ]
then
list=`w | grep $user | cut -c19-30`
if [ "$list" != "" ]
then
echo "The user $user is logged
in from $list"
else
echo "The user $user is not
logged in now"
fi
fi
@Joseph TKLee: Thank you for such a quick response. I created this script.. err rather copied it.. in my bin directory, which is completely empty, save for this script. I am going out on a limb here but I am guessing my directory should have a list of users somewhere inside in order for it to work properly? (apologies.. I am about as new to this as it gets.)
---------- Post updated at 11:11 PM ---------- Previous update was at 11:03 PM ----------