Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/bin/bash
  2. set -e
  3.  
  4. filename="$1"
  5. counter=0
  6. start=$SECONDS
  7. while read -r line
  8. do
  9. value=$(echo $line | cut -d, -f10)
  10. counter=$((counter+1))
  11. if ! ((counter % 10000)); then
  12. duration=$((SECONDS-start))
  13. echo $start
  14. echo "Processed 10000 in "$duration" seconds"
  15. fi
  16. done < "$filename"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement