magnus@thep.lu.se (Magnus Olsson) (09/20/90)
Thanks to everybody who sent email in response to my article. Most of the people point out that since mved is a shell script, it does its own wildcard expansion on top of that done by the shell, so even if mved gets the correct argument from the shell, it may crash on strange filenames. This is indeed a problem, and when I get the time, I'll probably write my own 'rename' program in C. But: My problem was actually caused by a bug (or a misfeature?) in the shell. Actually, not only mved failed on the filenames, but not even echo \[*\]* worked properly. Hans Mulder (hansm@cs.kun.nl) writes in his mail to me: >The csh on this machine (a Sun 3 running SunOS 4.0) >accepts \[*\] just fine. So, apparently csh was *meant* to accept this string, but it doesn't on my machine (which is not a Sun). >In general, if you want to give non-trivial shell commands, your best >bet is the Bourne shell, /bin/sh. It may be a little old and >unsophisticated, but al least the developers have eliminated most of >the bugs. Variants of csh grow new features every day, but the known >bugs are never eliminated. This advice was good - I tried the echo command above under /bin/sh and it worked! This was also pointed out by other people. During the 16 hours since I posted my article, I've received at least 15 email replies with more or less useful suggestions. Thanks a lot, but please don't send any more! Magnus Olsson | \e+ /_ Dept. of Theoretical Physics | \ Z / q University of Lund, Sweden | >----< Internet: magnus@thep.lu.se | / \===== g Bitnet: THEPMO@SELDC52 | /e- \q