If you're reluctant to use perl or some other scripting language (ruby ;-) then it sounds like you want sed or perhaps cut.
* Grant Robinson [Mon, 8 Sep 2003 at 14:37 -0600] <quote> > > On Monday, September 8, 2003, at 02:23 PM, Jan L. Peterson wrote: > > >How about something like this: > > > >for f in auto-*; do > > cp $f targetdir/no$f > >done > > Sorry, I guess auto and no auto was a bad example. What I really need > to know is how to capture the number for use in a new filename. so > auto-1 becomes bongo-1, and auto-2 becomes bongo-2, etc. > > Grant > > > ____________________ > BYU Unix Users Group > http://uug.byu.edu/ > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list </quote> -- Hans Fugal | De gustibus non disputandum est. http://hans.fugal.net/ | Debian, vim, mutt, ruby, text, gpg http://gdmxml.fugal.net/ | WindowMaker, gaim, UTF-8, RISC, JS Bach --------------------------------------------------------------------- GnuPG Fingerprint: 6940 87C5 6610 567F 1E95 CB5E FC98 E8CD E0AA D460
pgp00000.pgp
Description: PGP signature
____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
