extract_successful_ids.sh 493 B

1234567891011121314151617
  1. #!/bin/bash
  2. if [ -e "$1" ]; then
  3. file="$1"
  4. else
  5. echo 'CANNOT FIND LOG FILE'
  6. exit 1
  7. fi
  8. {
  9. grep 'Downloaded submission' "$file" | awk '{ print $(NF-2) }' ;
  10. grep 'Resource hash' "$file" | awk '{ print $(NF-2) }' ;
  11. grep 'Download filter' "$file" | awk '{ print $(NF-3) }' ;
  12. grep 'already exists, continuing' "$file" | awk '{ print $(NF-3) }' ;
  13. grep 'Hard link made' "$file" | awk '{ print $(NF) }' ;
  14. grep 'filtered due to score' "$file" | awk '{ print $9 }'
  15. }