Advertisement
Guest User

Untitled

a guest
May 30th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.18 KB | None | 0 0
  1. #!/bin/bash
  2. if [ $# -eq 0 ]
  3. then
  4.     who
  5.     exit 0
  6. fi
  7.  
  8. while [ $# -ne 0 ]
  9. do
  10.     ( ( who | grep "$1" > /dev/null ) && echo "$1 is conected" ) || echo "$1 is disconnected"
  11.     shift
  12. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement