Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. who | grep \(10\.1\.109 | cut -d " " -f 1 | while read login
  4. do
  5. cat /etc/passwd | grep -a ^$login | cut -d ":" -f 5
  6. cat /etc/passwd | grep -a ^$login | cut -d ":" -f 5 | cut -d " " -f 1 |
  7. {
  8. while read imie
  9. do
  10. cat /etc/passwd | cut -d ":" -f 5 | cut -d " " -f 1 |
  11. grep -a $imie | wc -l
  12. done
  13. }
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement