* FAQ's question - rename file name from lower to upper
@ 1995-10-12 4:00 Double Chiang
1995-10-13 4:00 ` Bassirou Bah
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Double Chiang @ 1995-10-12 4:00 UTC (permalink / raw)
Hi,
I read from FAQ for how to rename a bunch file from lower to upper,
it said you should write a script. like following.
foreach f (*)
mv $f 'echo $f | tr '[a-z]' '[A-Z]''
end
but when I tried to execute this script, the shell complain about
mv: . No match.
What's wrong? my shell is tcsh. Thanks in advance.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FAQ's question - rename file name from lower to upper
1995-10-12 4:00 FAQ's question - rename file name from lower to upper Double Chiang
1995-10-13 4:00 ` Bassirou Bah
@ 1995-10-13 4:00 ` Mark Bartelt
1995-10-13 4:00 ` Walter Karig
2 siblings, 0 replies; 4+ messages in thread
From: Mark Bartelt @ 1995-10-13 4:00 UTC (permalink / raw)
[ Double Chiang ]
| I read from FAQ for how to rename a bunch file from lower to upper,
| it said you should write a script. like following.
|
| foreach f (*)
| mv $f 'echo $f | tr '[a-z]' '[A-Z]''
| end
|
| but when I tried to execute this script, the shell complain about
| mv: . No match.
|
| What's wrong? my shell is tcsh. Thanks in advance.
Either the FAQ has a misprint, or perhaps you just miscopied. The
mv $f 'echo $f | tr '[a-z]' '[A-Z]''
should be
mv $f `echo $f | tr '[a-z]' '[A-Z]'`
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.toronto.edu
Theoretical Astrophysics mark@cita.utoronto.ca
"Nur eine Waffel taugt!" -- Parsifal, in an Eggo commercial
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FAQ's question - rename file name from lower to upper
1995-10-12 4:00 FAQ's question - rename file name from lower to upper Double Chiang
@ 1995-10-13 4:00 ` Bassirou Bah
1995-10-13 4:00 ` Mark Bartelt
1995-10-13 4:00 ` Walter Karig
2 siblings, 0 replies; 4+ messages in thread
From: Bassirou Bah @ 1995-10-13 4:00 UTC (permalink / raw)
What is wrong is the the backslash.
Enter this:
foreach f (*)
mv $f `echo $f | tr '[a-z]' '[A-Z]'`
end
Should work!
Regards!
Bassirou Bah
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FAQ's question - rename file name from lower to upper
1995-10-12 4:00 FAQ's question - rename file name from lower to upper Double Chiang
1995-10-13 4:00 ` Bassirou Bah
1995-10-13 4:00 ` Mark Bartelt
@ 1995-10-13 4:00 ` Walter Karig
2 siblings, 0 replies; 4+ messages in thread
From: Walter Karig @ 1995-10-13 4:00 UTC (permalink / raw)
In article <45iln8$3tc@usenet.pa.dec.com> double@taxe11.tao.dec.com (Double Chiang) writes:
> I read from FAQ for how to rename a bunch file from lower to upper,
> it said you should write a script. like following.
> foreach f (*)
> mv $f 'echo $f | tr '[a-z]' '[A-Z]''
> end
> but when I tried to execute this script, the shell complain about
> mv: . No match.
> What's wrong? my shell is tcsh. Thanks in advance.
The quotes are wrong:
...
> mv $f 'echo $f | tr '[a-z]' '[A-Z]''
... ^ ^
You have to use:
...
mv $f `echo $f | tr '[a-z]' '[A-Z]'`
... ^ ^
Walter
--
+-----------------------------------------------------------------------------+
| Walter Karig | Gesellschaft fuer Schwerionenforschung |
| Phone: 0049-6159-71-2147 | Planckstrasse 1 |
| E-Mail: W.Karig@gsi.de | D-64291 Darmstadt |
+-----------------------------------------------------------------------------+
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1995-10-13 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-10-12 4:00 FAQ's question - rename file name from lower to upper Double Chiang
1995-10-13 4:00 ` Bassirou Bah
1995-10-13 4:00 ` Mark Bartelt
1995-10-13 4:00 ` Walter Karig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox