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: 1164f8,cdca3dc8d6167cd4 X-Google-Attributes: gid1164f8,public X-Google-Thread: f7344,a808e23c428d1184 X-Google-Attributes: gidf7344,public X-Google-ArrivalTime: 2002-01-06 15:41:39 PST Newsgroups: comp.os.vms,alt.sys.pdp10,comp.sys.dec From: rivie@cougar.no.domain Subject: Re: historical evidence of what went wrong at DEC References: <3roT7.207043$tf5.13617499@bin5.nnrp.aus1.giganews.com> <3C338089.1C12E6FA@trailing-edge.com> Reply-To: ivie@cc.usu.edu Message-ID: User-Agent: slrn/0.9.7.1 (NetBSD) Cache-Post-Path: hoth!unknown@208.186.13.136 X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) NNTP-Posting-Host: 208.186.8.4 Date: 6 Jan 2002 17:28:52 -0600 X-Trace: corp.newsgroups.com 1010359732 208.186.8.4 (6 Jan 2002 17:28:52 -0600) X-Comments: This message was posted through Newsfeeds.com X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings. X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!! X-Report: Please report illegal or inappropriate use to X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS) Organization: Newsfeeds.com http://www.newsfeeds.com 80,000+ UNCENSORED Newsgroups. Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!xmission!local-out2.newsfeeds.com!corp.newsgroups.com Xref: archiver1.google.com comp.os.vms:58661 alt.sys.pdp10:9175 comp.sys.dec:11080 Robert@bonomi.invalid wrote: > If one has a -recurring- need to mass-rename by arbitrary extension, > then creating the following routine *once* provides the requisite > functionality: > > #!/bin/csh > > foreach file ( *$1 ) > mv $file `basename $file $1`$2 > end Until it runs into a filename with a space in it or one that starts with '-'. Happens to me all the time, although it seems to be much worse on systems which are acting as file servers for Mac folks (there's one fellow in the office who insists on making frequently used directories sort to the top of the directory list by tossing a space on the front of the filename). I'm probably simply dense, but I've never found a reasonable way of dealing with filenames that have spaces in Unix. Just when I think I've got it figured out, something will break. I've not found a quoting scheme that works in all situations; put quotes around it or escape the space and you're only fine until you pass it into a script which passes it along in the manner of the above snippet. -- Roger Ivie ivie@cc.usu.edu -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 80,000 Newsgroups - 16 Different Servers! =-----