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

Re: scripting help



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 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              -
----------------------------------------------------------------------


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