September 15th, 2013, 10:32 PM
Sunny Vacation Supporter!
Join Date: May 2012
Device(s): HTC One SV, Samsung Galaxy Prevail (retired), Nexus 7 (Gen 1)
Carrier: Boost Mobile
Thanked 1,949 Times in 1,027 Posts
Question to pose here:
Let's say I have a directory that contains subdirectories that I would like to zip in such a way that each subdirectory has its own zip file. Is there a way to do this with a script? I know I could do this manually but I would rather be able to just run the script
What I have so far:
ls -l $WORK/$SUBDIR > ~/listing
list="cat ~/listing | wc -l"
for d in $list; do
zip -r $d.zip $WORK/$SUBDIR/$d
Something's obviously wrong with this though as it doesn't do what I want it to do