Re: OT: shell scripts and spaces in file/folder names
On Thu, 17 Apr 2003, Joris Huizer wrote:
> for i in `ls .`
> do
> #...
> done
try ... (untested )
#
# note star instead of dot ...important...
#
# dont forget to cd /someplace/first
# and make sure cd worked
#
for i in ` ls * `
do
ls -la ' $i '
done
what you do with the files w/ whitespaces and other whacky chars
is up to you ... iny our command to process those files
--
-- be careful .. you can get into a heap of trouble
-- w/o first checking the files for wierd/un-acceptable filenames
-- esp if you have a joker in your lan that likes practical jokes
--
-- scripting is fun and annoying too, and fast and simple, or long and
tedious
c ya
alvin
Reply to: