1
0
Fork 0
mirror of synced 2024-05-21 12:42:44 +12:00

Add scripts to extract IDs

This commit is contained in:
Serene-Arc 2021-05-01 13:23:31 +10:00 committed by Serene
parent fe95394b3b
commit db0f90b4e3
2 changed files with 34 additions and 0 deletions

17
scripts/extract_failed_ids.sh Executable file
View 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"

View 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"