1
0
Fork 0
mirror of synced 2024-10-02 01:57:20 +13:00
bulk-downloader-for-reddit/scripts/extract_successful_ids.sh
OMEGARAZER 98aa3d7cb6
Quote cleanup
cleanup of some strings to prioritize outer double quotes when both are present or switch to double quotes when only single is present.
2023-02-18 16:06:32 -05:00

17 lines
493 B
Bash
Executable file

#!/bin/bash
if [ -e "$1" ]; then
file="$1"
else
echo "CANNOT FIND LOG FILE"
exit 1
fi
{
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) }" ;
grep "Hard link made" "$file" | awk "{ print $(NF) }" ;
grep "filtered due to score" "$file" | awk "{ print $9 }"
}