simple question about mv

Richard Nuttall richard at torch.UUCP
Mon Feb 6 20:12:27 AEST 1989


DEG41560 at ua1vm.ua.edu (Rob Smith) writes:

>HI,

> I know this is simple, but then again, so am I.  What if I want to mv a bunch
>of files with the same suffix to another suffix. The following does not
>work

>    mv *.flip *.flop

I prefer the C shell foreach, which is really neat :

foreach i (*.flip)
echo $i
mv $i $i:r.flop
end


I use these kind of commands all the time, and usually include the echo line
(not actually necessary) so I can see what's happening.


Richard.



More information about the Comp.unix.wizards mailing list