Guest User

Untitled

a guest
Jan 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. LINES=`cat http_access.log |wc -l`
  2. for i in $LINES $LINES-1 $LINES-2
  3.  
  4. do
  5. echo "VALUE $i"
  6. head -$i http_access.log | tail -1 > holy.txt
  7. temp=`cat holy.txt| awk '{print $9}'`
  8.  
  9. if [[ $temp == 200 ]]
  10. then
  11. echo "line $i has 200 code at "
  12. cat holy.txt | awk '{print $4}'
  13. fi
  14. done
Add Comment
Please, Sign In to add comment