Re: scripting help

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

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux