[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] String editing using the shell (/bin/sh)
- Subject: [ale] String editing using the shell (/bin/sh)
- From: kwc at world.std.com (Kenneth W Cochran)
- Date: Thu, 30 Nov 2000 15:44:08 -0500 (EST)
Hi,
I'm trying to rename files using shell scripting (/bin/sh).
How do I "edit" the "name?"
As examples, I'd like to be able to do:
1. a "prefix substitution" (Is there a shell feature that
will allow this?) I can do a "prefix chop" using
${p#w}, but how about a substitution?
2. an "in the middle" substitution (sed?)
3. a "suffix substitution" (same as #1, but on the
"other" end) I can do a "suffix chop" using ${p%w},
but, as in (1.) how might I do a substitute?
Btw, any good shell programming book references? My 1990
Kochan & Wood 2nd ed seems rather old nowadays... :)
Thanks,
-kc
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.