BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:RE: {bb} Need some SED assistance...



How about much shorter version:

echo $BBALPHAMSG | sed -e "s/CST.*//"

The "-e" is not strictly necessary. All the pattern operation does is look for
any pattern beginning with "CST" and replaces everything including "CST" and
beyond on the same line with a null. The front end of the line before the "CST"
should be left intact. If you have a space in front of the CST (what do I
know....) that you also want to get rid of, then try:

echo $BBALPHAMSG | sed -e "s/ CST.*//"

____________________Reply Separator____________________
Subject:    RE: {bb} Need some SED assistance... 
Author: <bb@bb4.com>
Date:       12/28/1999 3:04 PM

On Tue, 28 Dec 1999, William B. Meloney VII wrote:
> Thanks for your assistance...You are the only one to respond thus far...
> 
> I attempted to use your suggestion in the following manner -
> 
>  echo $BBALPHAMSG | sed "s/\(.*\)CST/\1/"
> 
> prior to sending it to qpage.  It successfully removed the "CST" from the
> string but did not truncate it at that point.
> 
> Suggestions?
Try this instead
 echo $BBALPHAMSG | sed "s/\(.*\)CST\(.*\)/\1/"

> 
> Thanks
> 
> - Bill
> 
> > > In order to appease the manglement types I need to reduce the
> > > ${BBALPHAMSG} to only that which comes _before_ "CST"
> >
> > sed 's/\(.*\)CST/\1/'
> >

-- 
Henrik Olsen,  Dawn Solutions I/S       URL=http://www.iaeste.dk/~henrik/
             Do not meddle in the affairs of dragons,
         for you are crunchy and taste good with ketchup.


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index