'ls' question, splitting and files with spaces in their name...
Jim Rootham
jim.rootham-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Sat May 22 14:22:11 UTC 2004
Hi Madison
Try adding the switch, then substituting a magic char for the escape-blank
combo, then do the split. Check for magic char first if you're paranoid.
BTW why s/\n// rather than chomp?
Jim
>
> My problem is that I am just straight splitting on spaces and some
>files and directory names have spaces in them. I read the 'ls' man page
>and the closest thing I could find was a switch to add an escape
>character before the space but that would only be marginally helpful.
>
> What I need is some way to show the file or directory name with some
>other character instead of a space so that the first split will leave
>the file or directory name intact wherein after I could substitute the
>space back.
>
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list