simple question about mv
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Jan 28 15:13:12 AEST 1989
In article <18216 at adm.BRL.MIL> DEG41560 at ua1vm.ua.edu (Rob Smith) writes:
> mv *.flip *.flop
Since filename expansion is performed by the shell, not by the "mv"
utility, for the shell to directly do what you're attempting it would
have to know the semantics of "mv". That is contrary to the design
principles of the UNIX shell.
If you have a "basename" utility, try something like:
for i in *.flip
do mv $i `basename $i .flip`.flop
done
Notice how much more general this approach is.
More information about the Comp.unix.questions
mailing list