[wellylug] cat README | more ???

Phillip Hutchings sitharus at gmail.com
Wed Nov 3 11:24:56 NZDT 2004


> 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.

grep -v discard README | grep wanted | less


-- 
Phillip Hutchings
http://www.sitharus.com/
sitharus at gmail.com / sitharus at sitharus.com




More information about the wellylug mailing list