From owner-freebsd-questions@FreeBSD.ORG Thu Nov 1 19:35:15 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B68E16A419 for ; Thu, 1 Nov 2007 19:35:15 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr7.xs4all.nl (smtp-vbr7.xs4all.nl [194.109.24.27]) by mx1.freebsd.org (Postfix) with ESMTP id 056CB13C49D for ; Thu, 1 Nov 2007 19:35:14 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr7.xs4all.nl (8.13.8/8.13.8) with ESMTP id lA1JYR9u092841; Thu, 1 Nov 2007 20:34:27 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id EA2C1B82D; Thu, 1 Nov 2007 20:34:26 +0100 (CET) Date: Thu, 1 Nov 2007 20:34:26 +0100 From: Roland Smith To: adrian kok Message-ID: <20071101193426.GB65305@slackbox.xs4all.nl> Mail-Followup-To: adrian kok , freebsd-questions@freebsd.org References: <344906.54737.qm@web33310.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H1spWtNR+x+ondvy" Content-Disposition: inline In-Reply-To: <344906.54737.qm@web33310.mail.mud.yahoo.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: can you help script about rename directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2007 19:35:15 -0000 --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--