Advertisement
Guest User

ass 2_24

a guest
Sep 2nd, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. ass 2_24
  2. lab@ubuntu:~$ cat usermsg.sh
  3. echo "enter user name"
  4. read name
  5.  
  6. who | grep $name > /dev/null
  7. if [$? -eq 0]
  8. then
  9. echo "user is logged in"
  10. echo "please enter a message to send:"
  11. read message
  12. write $1 message
  13. else
  14. echo "user is not logged in"
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement