[wellylug] cat README | more ???

Enkidu enkidu at cliffp.com
Wed Nov 3 11:21:19 NZDT 2004


On Wed, 3 Nov 2004 11:02:53 +1300, you wrote:

> This is just a quick side question to the "Gentoo - how do you
>install it?" thread - Cliff suggested reading the README by: `cat
>README | more`
> Why would you pipe the output of `cat README` through more, instead
>of just running `more README`? And why use more at all, when you can
>use less?
> I'm just curious about this, personally I would have run `less README`.
>
In this case, there is no advantage to doing it that way. But
more/less/most are filters and can be replaced by other filters, such
as grep/sort etc. 

Say you wanted to not see all lines with "discard" in them, and you do
want to see only those lines with "wanted", *after* looking at the
file for the first time? So up-arrow, back-arrow over the "more" and
type "grep -v discard | grep wanted  |" so that you have

cat README | grep -v discard | grep wanted | more

No doubt there are better ways to do it.

Also you can use the cat parameters to, for example, number all the
lines.

But it probably makes no difference really. And I use less most of the
time.

Cheers,

Cliff




More information about the wellylug mailing list