Created
October 19, 2020 07:28
-
-
Save ecatanzani/9ffc9424fa97ca1980e6fa0ffe5e5707 to your computer and use it in GitHub Desktop.
Check empty files in list
This file contains hidden or 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
#!/usr/bin/env bash | |
_LIST=$1 | |
echo "Reading files in ${_LIST}" | |
while IFS="" read -r line || [ -n "${line}" ] | |
do | |
if [[ -s ${line} ]]; then echo "${line}: NOT EMPTY"; else echo "${line}: EMPTY"; fi | |
cat ${line} >> test_if_empty.txt | |
done < ${_LIST} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment