2021-05-01 15:23:31 +12:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -e "$1" ]; then
|
|
|
|
file="$1"
|
|
|
|
else
|
|
|
|
echo 'CANNOT FIND LOG FILE'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$2" ]; then
|
|
|
|
output="$2"
|
|
|
|
echo "Outputting IDs to $output"
|
|
|
|
else
|
2021-06-13 11:49:57 +12:00
|
|
|
output="./successful.txt"
|
2021-05-01 15:23:31 +12:00
|
|
|
fi
|
|
|
|
|
2021-05-22 13:47:59 +12:00
|
|
|
{
|
|
|
|
grep 'Downloaded submission' "$file" | awk '{ print $(NF-2) }' ;
|
|
|
|
grep 'Resource hash' "$file" | awk '{ print $(NF-2) }' ;
|
|
|
|
grep 'Download filter' "$file" | awk '{ print $(NF-3) }' ;
|
|
|
|
grep 'already exists, continuing' "$file" | awk '{ print $(NF-3) }' ;
|
2021-05-22 13:53:12 +12:00
|
|
|
grep 'Hard link made' "$file" | awk '{ print $(NF) }' ;
|
2021-05-22 13:47:59 +12:00
|
|
|
} >> "$output"
|