From owner-freebsd-questions Mon Oct 20 17:44:42 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA03722 for questions-outgoing; Mon, 20 Oct 1997 17:44:42 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from DonaldBurr.dyn.ml.org (root@ppp12180.la.inreach.net [206.18.115.180]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA03712 for ; Mon, 20 Oct 1997 17:44:24 -0700 (PDT) (envelope-from dburr@POBoxes.com) Received: from DonaldBurr.dyn.ml.org (dburr@DonaldBurr.DonaldBurr.dyn.ml.org [192.160.60.1]) by DonaldBurr.dyn.ml.org (8.8.5/8.8.5) with SMTP id RAA07141; Mon, 20 Oct 1997 17:45:33 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.1 [p0] on FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199710202356.QAA29920@hub.freebsd.org> Date: Mon, 20 Oct 1997 17:43:13 -0700 (PDT) Organization: Starfleet Command From: Donald Burr To: questions@FreeBSD.ORG Subject: RE: questions-digest V3 #489 Cc: jabbott@blue.pca.state.mn.us Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- My secret spy satellite informs me that on 20-Oct-97, owner-questions-digest@FreeBSD.ORG wrote: >From: abbott on blue >Date: Mon, 20 Oct 1997 10:13:24 -0500 >Subject: Unix question. Regular expressions in commands? > >I guess this is kind of a newbie unix question. I have just learned >about >regular expressions within perl and so am trying to use them everyplace. >:-) > >>From a command line what I would like to do is.... ># mv *.[dump asc dat txt clean] tablecreation There are differences (some subtle, some not) between Perl-ish regexps and regexps used by other unix programs (e.g. shell). In shell-ese, what you want to do should be stated as: # mv *.{dump,asc,dat,txt,clean} tablecreation Note the usage of {} instead of [], and the arguments are separated by commas, not spaces. Read the regexp(3) man page to for more information on how the rest of the unix world handles regexps. - --- Donald Burr - Ask me for my PGP key | PGP: Your WWW HomePage: http://DonaldBurr.base.org/ ICQ #1347455 | right to Address: P.O. Box 91212, Santa Barbara, CA 93190-1212 | 'Net privacy. Phone: (805) 957-9666 FAX: (800) 492-5954 | USE IT. -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBNEv7LPjpixuAwagxAQEDIAP/QnrEF3sBjKtLKhNIJ+fTKZWH677+D1m8 IFMWwfsIHZE5sIaA2PdRSrKT27X7YWEBMlCpMvR/GXK96Fy/ksKdQdpeSLtutrmw 9WYIW/grk+0sIIirj50+D3vC57sO3RzvaBRiqvsp+q/b1ASO60w8IpuDKtTo/qyh +cdbGnQRsio= =6g0m -----END PGP SIGNATURE-----