I am looking at automating unzipping some files I have in directories. I am having a problem getting thru dumb characters in the filename, like spaces and dashes.
for i in ls *7z; do 7za -y e $i; done
This fails at those special cases. What do I do to properly pass in the proper filename?
Thanks!
Andrew.
while read `ls *` ; do 7za -y e $i; done
find . -name ‘*.jpg’ | while read i; do ls -l "$i";
find . -name ‘*.jpg’ -print0 | xargs -0 -l1 ls -l
for i in *; do 7za -y e "${i}"; done
Those are all solutions that I got in IRC. Figured I would pass them on. Of course a few were generic (like the middle two). Those are functionally identical.
Bookmarks