need SIMPLE grep piping examples

Thiers Botelho thiers at fosfertil-ultrafertil.com.br
Fri Mar 26 15:13:39 UTC 2004


On Fri, 26 Mar 2004 16:08:00 +0200 Mihai Maties <mihai xcyb org>  wrote:

|On Friday 26 March 2004 15:04, Thiers Botelho wrote:
|>
|> (I need to show any line containing _either_ of the strings)
|>
|> so that a script could output just the header line of 'df' plus the 
single
|> line describing '/dev/foobar' below it.
|
|df -m|grep -E 'Filesystem|/dev/foobar'
|or
|df -m|egrep 'Filesystem|/dev/foobar'
|
|
|Mihai

Thnx a lot.     :))

I'd never have thought of '-E' by myself, since I thought it was meant 
only for regular expressions (I'm not quite ready for this stuff yet). . .

Thiers





More information about the fedora-list mailing list