Wow, the 'for F in...' works a treat, while the xargs option is a bomber. You would expect xargs would work, but nope. But thanks for the first option!
-----Original Message----- From: Logan, David (SST - Adelaide) [mailto:[EMAIL PROTECTED] Sent: Friday, 11 June 2004 11:00 To: [EMAIL PROTECTED] Subject: RE: [U2] How keep '\' in unix/uniVerse filenames? Importance: Low Hi LeRoi, Try using something like for F in `ls TRAN*` do ls -l $F done or ls TRAN* | xargs -t -i ls -l {} Maybe the read is the offending command that is stripping the backslash as this would have to parse the data prior to presenting it to the next command. This would be a bit faster than using the find (unless you have to) Regards David Logan Database Administrator HP Managed Services 139 Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kent Walker Sent: Friday, 11 June 2004 9:55 AM To: [EMAIL PROTECTED]; U2-Users (E-mail) Subject: Re: [U2] How keep '\' in unix/uniVerse filenames? Perhaps a command after the "do": tr "\\" "/" At 02:52 PM 6/10/2004, LeRoi Keiller wrote: >A number of our uniVerse files have the \ symbol in the file names. Problem >is, at unix level, these \ fellows are usually treated as 'escape' >characters and ignored or removed when you try to reference them. Eg: echo >"hello\there" displays "hellothere". > >Does anyone know how to ensure that the unix shell treats these as literal >text? Note that {}, quotes, and double-quotes don't seem to work. > >To elaborate (you can ignore this if you like)... > >Cutdown example of what I'm trying to do (ksh): > >$ ls TRAN* >TRAN.EXT-14320S1??\4-DF >TRAN.EXT-14320S1??\5-DF > (note the '\' in the file names) >$ find TRAN* -print | while read file >do > ls -l $file" >done >TRAN.EXT-14320S1??4-DF not found > >Note: The 'find' produces the correct names, but subsequent unix commands >missinterpret the meaning. Because the '\' is stripped, the ls command >tries to list D_TRAN.EXT-14320S1??4-DF instead of TRAN.EXT-14320S1??\4-DF, >and of course the file is not found. > >Any ideas? > >Thanks, >LeRoi > >LeRoi Keiller >Technical Support Consultant > --- Kent Walker - Datatel Analyst Information Technology - U.C. Hastings College of the Law 415-565-4635 ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ Disclaimer Notice This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action or place any reliance on it. If you have received this message in error please notify Ultradata immediately on +61 3 9291 1600. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Ultradata Australia Pty. Ltd. To unsubscribe from receiving commercial electronic messages from Ultradata Australia please email [EMAIL PROTECTED] with the subject heading "Unsubscribe". ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
