Skip site navigation (1)Skip section navigation (2)
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--H1spWtNR+x+ondvy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 02, 2007 at 02:20:13AM +0800, adrian kok wrote:
> Hi all=20
>=20
> how can I have script to rename the following
> directory pattern from
>=20
> =20
>=20
> from=20
>=20
> dir-192.168.30.0  =20
> dir-192.168.30.144=20
> dir-192.168.30.184
>=20
>=20
> To:
>=20
> dir-10.0.30.0  =20
> dir-10.0.30.144=20
> dir-10.0.30.184
>=20
> thank you

for f in dir-192*; do mv $f `echo $f|sed s/192\.168/10\.0/`; done

Roland
--=20
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)

--H1spWtNR+x+ondvy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHKipCEnfvsMMhpyURAlZfAJ9UPQac2BWhqQ5RdHLjltggbp+NaACgrYbe
mGRgQA67sLPnZY4CesV4a6E=
=58r6
-----END PGP SIGNATURE-----

--H1spWtNR+x+ondvy--



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