I have multiple text files stored in a directory. My goal is to output the last non empty line (in excel) + the file name.
I have a shell file (script.sh). That implements the following code:
filename=$1
sed '/^\s*$/d'
echo $filename `tail -1 $filename`
I have tried the following:
find . -name '*.txt' -exec bash ./script.sh {} \; | xargs -L1 |