Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 1996 09:31:06 +0930 (CST)
From:      Peter Childs <pjchilds@imforei.apana.org.au>
To:        hmmm@alaska.net (hmmm), freebsd-questions@freebsd.org
Subject:   Re: multiple files
Message-ID:  <199609250001.JAA19462@al.imforei.apana.org.au>

next in thread | raw e-mail | index | archive | help
In article <Pine.BSF.3.95.960924203341.562B-100000@hmmm.alaska.net> you wrote:
: how can i rename multiple files w/o doing it 1-by-1?

: ie,

: abc.tar.gz > abc.tgz
: def.tar.gz > def.tgz
: hij.tar.gz > hij.tgz

 foreach i ( *.tar.gz )
 mv $i $i:r.tgz
 end

 Peter

--
 Peter Childs  ---  http://www.imforei.apana.org.au/~pjchilds
  Finger pjchilds@al.imforei.apana.org.au for public PGP key
         Drag me, drop me, treat me like an object!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609250001.JAA19462>