Add scripts to extract IDs
This commit is contained in:
parent
fe95394b3b
commit
db0f90b4e3
17
scripts/extract_failed_ids.sh
Executable file
17
scripts/extract_failed_ids.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
output="failed.txt"
|
||||
fi
|
||||
|
||||
grep 'Could not download submission' "$file" | awk '{ print $12 }' | rev | cut -c 2- | rev >>"$output"
|
17
scripts/extract_successful_ids.sh
Executable file
17
scripts/extract_successful_ids.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
output="successful.txt"
|
||||
fi
|
||||
|
||||
grep 'Downloaded submission' "$file" | awk '{ print $(NF-2) }' >> "$output"
|
Loading…
Reference in a new issue