Advertisement
edps

emerge-progress.sh

Nov 9th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. sudo tail -n 50 /var/log/emerge.log |\
  4. tac |\
  5. grep -v "Starting retry" |\
  6. grep -iE '([0-9]* of [0-9]*)' -o -m 1 |\
  7. sed -e 's/\(.*\) of \(.*\)/\1 \2/' |\
  8. awk '{print 100.0*$1/$2}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement