[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion for a new option
From: |
Andreas Schwab |
Subject: |
Re: Suggestion for a new option |
Date: |
Thu, 13 Nov 2008 19:00:56 +0100 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux) |
Matthew Wakeling <address@hidden> writes:
> I have a suggestion for a new option for grep, which is really rather
> obvious and simple to implement, and comes about by me running commands
> like:
>
> ps auxww | grep something
>
> I would like an option that would make grep output the first line (or two
> - an extended option maybe) regardless of whether that line matches. That
> way, I would get the titles at the top of my report, which would be
> useful.
$ ps auxww | awk 'NR == 1; /something/'
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."