SUMMARY: sed script help4

From: pelicancomputers <rfransix_at_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
Received on Thu Nov 14 16:53:29 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:58 EST