Hello,
I am trying to append "_EMPTY" to the end of a bunch of empty files in the same directory. I am able to list the files to be appended with this:
find /Users/iannelson/Desktop/EmptyFile -size +0
I have tried various methods of sed and awk to append, but I really haven't found a good example that explains how to use them, so i can't figure out what is necessary. Also, I'm not certain that I can get it done with one line, I may need a for loop. Here is one of my for loops:
for file in ?; do
apname=${_EMPTY}
mv $file '$apname'
done
*Not sure what to put for the ?.
or this one:
for loopEmptyFiles in $emptyfiles
do
originName=$(echo $loopEmptyFiles|awk '{?}');
newName=$ originName"_EMPTY"
echo "Appending $newName";
done
*Not sure what goes between the brackets.
Any help would be greatly appreciated. I also have a few more scripts I could use some help on, hope I don't overwhelm you guys
