Advertisement
ostyleo

Untitled

Apr 11th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ $# -eq 0 ];then
  4.     echo MACAR UN USER!
  5.     exit 2
  6. fi
  7.  
  8.  
  9. for i in $@;do
  10.     if ! `w|cut -d" " -f1|grep -q $i`;then
  11.         echo Userul $i nu exista!
  12.         continue
  13.     fi
  14.  
  15.     if `last $i|head -n -1|grep -q "Tue"`;then
  16.         echo $i `last $i|head -n -1|grep "Tue"|wc -l`>>awCc.txt
  17.     fi
  18. done
  19.  
  20. cat awCc.txt|sort -r
  21. rm awCc.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement