simple question about mv

Randal L. Schwartz @ Stonehenge merlyn at intelob.intel.com
Sun Jan 29 06:33:43 AEST 1989


In article <18231 at adm.BRL.MIL>, moss at BRL (VLD/VMB) writes:
| Well, this should work under a Bourne shell:
| $ for i in *.flip
| > do	mv $i `basename $i .flip` .flop
| > done
| $

Almost.  Don't try this at home, kiddies.  Remove the space before
".flop", or you'll end up with something very unintended.

Try this:

$ for i in *.flip; do mv $i `basename $i .flip`.flop; done

Presto-magico.
-- 
Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095
on contract to BiiN (for now :-), Hillsboro, Oregon, USA.
ARPA: <@iwarp.intel.com:merlyn at intelob.intel.com> (fastest!)
MX-Internet: <merlyn at intelob.intel.com> UUCP: ...[!uunet]!tektronix!biin!merlyn
Standard disclaimer: I *am* my employer!
Cute quote: "Welcome to Oregon... home of the California Raisins!"



More information about the Comp.unix.questions mailing list