scripting help

Rick Stevens rstevens at vitalstream.com
Fri Sep 29 20:11:09 UTC 2006


On Fri, 2006-09-29 at 17:14 +0100, Paul Howarth wrote:
> Tom Brown wrote:
> > Hi
> > 
> > I have a script and the output of that script is currently
> > 
> > UCD-SNMP-MIB::ucdavis.55.101.1 = STRING: "CRITICAL emcpowera, 2 dead, 2 
> > alive, possible LUN tresspass or HBA failure"
> > 
> > is there anyway to cut off the text '
> > UCD-SNMP-MIB::ucdavis.55.101.1 = STRING: '
> > 
> > so that i get whatever comes AFTER that ?
> 
> Pipe the output through:
> 
>    sed -e 's/^UCD-SNMP-MIB::[^:]*: //'

Or pipe it through "cut -d : -f 4"

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      "Microsoft is a cross between The Borg and the Ferengi.       -
-  Unfortunately they use Borg to do their marketing and Ferengi to  -
-               do their programming."  -- Simon Slavin              -
----------------------------------------------------------------------




More information about the fedora-list mailing list