Thanks
Thanks a bunch, but your script makes my fonts folder into one big archive.
Is their any way that I could do this piece of code to each folder inside on my fonts folder. When I ran it, it just created a large archive of my whole fonts folder and didn't just zip up each folder individually inside of the fonts folder.
Thanks, Flashuni
For Example Here is my previous script that doesnt work:
## zip the contents of each folder in the current directory into an archive:
for d in *; do if [ -d "$d" ]; then cd "$d"; cd ..; fi; done
## zip every folder in the current directory into an archive:
for d in *; do if [ -d "$d" ]; then zip -r -j "$d.zip" "$d"; fi; done
## example recursively forces the deletion of the directory if zip returns true:
for d in *; do
if [ ! -d "$d" ]; then
continue
fi
if ! zip -R -j "$d.zip" "$d"; then
continue
fi