From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb0e,cdca3dc8d6167cd4 X-Google-Attributes: gidfdb0e,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2002-01-04 10:31:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-proxy.baileynm.com!citadel.in.taronga.com!not-for-mail From: peter@taronga.com (Peter da Silva) Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec Subject: Re: historical evidence of what went wrong at DEC Date: 4 Jan 2002 18:16:02 GMT Organization: TSS Inc. Message-ID: References: <3roT7.207043$tf5.13617499@bin5.nnrp.aus1.giganews.com> <3C338089.1C12E6FA@trailing-edge.com> NNTP-Posting-Host: citadel.in.taronga.com X-Trace: citadel.in.taronga.com 1010168162 66368 10.0.0.43 (4 Jan 2002 18:16:02 GMT) X-Complaints-To: usenet@taronga.com NNTP-Posting-Date: 4 Jan 2002 18:16:02 GMT X-Newsreader: trn 4.0-test72 (19 April 1999) Xref: archiver1.google.com comp.os.vms:58372 alt.sys.pdp10:9102 comp.sys.dec:10980 In article , Bill Pechter wrote: >It's pretty common with windows users with FILEXXX.DOC which >needs to be renamed filexxx.doc, though. I don't see a "lowercase" option in either Windows "ren" or VMS "rename". Do newer VMS versions maintain the case of filenames anyway? If I had to do that kind of thing monthly, I'd write a script that did it and fixed up any other windows-related awfulness in the file names. >When I have to I resort to xargs. I don't have to like it, though. I wouldn't. Let's see... Windows file names don't have newlines or backslashes in the filename part, so this should be safe: #!/bin/sh ls ${1+"$@"} | while read file do target="`echo $file | tr '[A-Z ~]' '[a-z__]'`" newfile="$target" index=0 while [ -f $newfile ] do index="`expr $index + 1`" newfile="$target.$index" done if [ ".$file" != ".$newfile" ] then mv "$file" "$newfile" fi done If performance was an issue, I'd do a little sed script to gen a shell script and run it like this: ls ${1+"$@"} | sed -f $script | sh But my sed is too rusty to come up with a good solution right now. -- Rev. Peter da Silva, ULC. WWFD? "Be conservative in what you generate, and liberal in what you accept" -- Matthew 10:16 (l.trans)