Date: Thu, 1 Nov 2007 20:34:26 +0100 From: Roland Smith <rsmith@xs4all.nl> To: adrian kok <adriankok2000@yahoo.com.hk> Cc: freebsd-questions@freebsd.org Subject: Re: can you help script about rename directory Message-ID: <20071101193426.GB65305@slackbox.xs4all.nl> In-Reply-To: <344906.54737.qm@web33310.mail.mud.yahoo.com> References: <344906.54737.qm@web33310.mail.mud.yahoo.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, Nov 02, 2007 at 02:20:13AM +0800, adrian kok wrote: > Hi all > > how can I have script to rename the following > directory pattern from > > > > from > > dir-192.168.30.0 > dir-192.168.30.144 > dir-192.168.30.184 > > > To: > > dir-10.0.30.0 > dir-10.0.30.144 > dir-10.0.30.184 > > thank you for f in dir-192*; do mv $f `echo $f|sed s/192\.168/10\.0/`; done Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHKipCEnfvsMMhpyURAlZfAJ9UPQac2BWhqQ5RdHLjltggbp+NaACgrYbe mGRgQA67sLPnZY4CesV4a6E= =58r6 -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071101193426.GB65305>
