AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090519113504.6cf211b8@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<patrick.haverty@onstor.com>,<brian.stark@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	102AB4F33EBBDB4C91915B145C8E9FB312972FB82C@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Tue, 19 May 2009 11:35:39 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Patrick Haverty <patrick.haverty@onstor.com>
Cc: Brian Stark <brian.stark@onstor.com>
Subject: Re: Leopard System Event Reporting Grep Filter
Message-ID: <20090519113539.4ee4c251@ripper.onstor.net>
In-Reply-To: <102AB4F33EBBDB4C91915B145C8E9FB312972FB82C@exch1.onstor.net>
References: <102AB4F33EBBDB4C91915B145C8E9FB312972FB82C@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Tue, 19 May 2009 09:39:23 -0700 Patrick Haverty
<patrick.haverty@onstor.com> wrote:

> I learned a new thing about grep (i.e. multiple strings to match) and
> thought I'd share the command I came up with that trims most of the
> fat out of the fmtopo -V output.
> 
> /usr/lib/fm/fmd/fmtopo -V | grep
> "sensor\|mode\|type\|reading\|indicator\|state"

Ah, it's so amusing watching the kids grow up, it really is ~:^)

Couple of tips: inside quotes, you don't need the backslash to quote
the pipe symbol.  If you really, doubly, want to make sure nothing is
expanded or interpreted, use the single quote instead of double
quotes.  Little known fact: the pipe '|' is a natural line continuation
character (when used as a pipe).  So you can end a line with the pipe
character, and the shell will dutifully wait for you to type the rest
of your command in on the next line before it goes off and does it.

Nice work!

Cheers,

a
