SUMMARY: sed script help4

From: pelicancomputers (rfransix@yahoo.com)
Date: Thu Nov 14 2002 - 10:34:48 EST


Thank you very much for the overwhelming response.
For my purposes, putting a $ sign after the 1
instructs the replace command to stop after the 1,
just as the ^ instructs it to start at smDisabled.

> /bin/sed 's/^smDisabled: 1/smDisabled: disabled/' <
> $TEMP3 > $DATA_MMM

--- pelicancomputers <rfransix@yahoo.com> wrote:
> i have a one liner like this:
>
> /bin/sed 's/^smDisabled: 1/smDisabled: disabled/' <
> $TEMP3 > $DATA_MMM
>
> however, it replaces not only '1', but anything else
> that begins with a '1'.
>
> how can i write this to only replace this
> attribute's value if it is a '1'?
>
> thank you.
>
> rick
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:17 EDT