Guest User

Untitled

a guest
Jul 8th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. skripta:
  2.  
  3. #!/bin/bash
  4. for (( i = 5; i >=0; i-- )) ; do
  5. grep $(date +%T -d "-$i min") /var/log/exim4/mainlog >> /home/drot/5min.log | cat /home/drot/5min.log | awk '/=>|<=/{print $2 " " $4 " " $5}'
  6. done
  7.  
  8. output:
  9.  
  10. 17:23:02 <= root@eu-softing.com
  11. 17:23:02 => davor.rotim@eu-softing.com
  12. 17:23:02 <= root@eu-softing.com
  13. 17:23:02 => davor.rotim@eu-softing.com
  14. 17:23:02 <= root@eu-softing.com
  15. 17:23:02 => davor.rotim@eu-softing.com
  16. 17:23:02 <= root@eu-softing.com
  17. 17:23:02 => davor.rotim@eu-softing.com
  18. 17:23:02 <= root@eu-softing.com
  19. 17:23:02 => davor.rotim@eu-softing.com
  20. 17:23:02 <= root@eu-softing.com
  21. 17:23:02 => davor.rotim@eu-softing.com
Add Comment
Please, Sign In to add comment