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/

Reply via email to