Script No .
Definition:
Write a shell script to display the login names that begin with ‘s’.
Script:
clear
echo "enter the username to search with"
read un
who |cut -d " " -f1 | grep $un
cnt=`who|cut -d " " -f1 |grep $un| wc -l`
echo $cnt users with username are $uname
OR
echo "Login names beginnin with 's' : "
#who | awk '$1 ~ /^s/'
who | awk '{ if ($1 ~ /^s/) print $1 }'
OR
who | grep s*