On Wed, Mar 01, 2006 at 12:02:17AM -0700, Archaic wrote:
>
> Right:
> JUSTFORBRUCE=`echo ${BIGSTRING} | sed "s/^.*\($MYSTRING\).*$/\${COUNTER}/"`
BTW, if MYSTRING has no whitespace it can be even further simplified.
JUSTFORBRUCE=`echo ${BIGSTRING} | sed "s/^.*$MYSTRING.*$/$COUNTER/"`
Of course, this is assuming the test case you provided is an accurate
depiction of the script in question.
--
Archaic
Want control, education, and security from your operating system?
Hardened Linux From Scratch
http://www.linuxfromscratch.org/hlfs
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page