Last active
January 30, 2023 14:44
-
-
Save aih/ee93f0f460a36f20fd3b6659843977da to your computer and use it in GitHub Desktop.
Finds files that are created with an -extracted.json ending, but not a -fullresults.json ending
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get list of files ending with -extracted.json | |
files_extracted=$(ls *-extracted.json) | |
# Use for loop to iterate over list of files ending with -extracted.json | |
for file in $files_extracted; do | |
# Check if file with -fullresults.json ending exists | |
if [ ! -f ${file%-extracted.json}-fullresults.json ]; then | |
# Print the filename if it doesn't exist | |
echo ${file%-extracted.json} | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment