18 Jun
2003
18 Jun
'03
03:37
On Tue, Jun 17, 2003 at 03:58:08PM -0700, Christopher Mahmood wrote: : * Quinlan, Grant (Grant_Quinlan@bmc.com) [030617 15:29]: : > I didn't know that I could use sed-like substitutions with bash variables! : : There are more of them, see the 'Parameter Expansion' section of : bash(1). '${!prefix*}' is a pretty evil one. : : > Neat little tool! I checked and it doesn't work for ksh or sh however ;-< For sh/ksh88 do the following: for i in `ls -d *SNG*`; do mv $i `echo $i | sed 's/\.SNG//g' done : Yeah, ksh can do '%%' like someone else suggested. ksh93 also supports sed-like substitions. --Jerry -- Open-Source software isn't a matter of life or death... ...It's much more important than that!