[Novalug] need grep help

James Ewing Cottrell 3rd JECottrell3@Comcast.NET
Fri Mar 16 17:28:35 EDT 2012


On 3/16/2012 11:14 AM, Christopher Garrity wrote:
> cat file | grep -v ^\# | less # is more
>
There are certain idioms that keep cropping up, refusing to die.

There is no reason for the cat...simply move the file to grep:

grep -v ^# file | less

Also, within less, you can do: /!^#
to search for the next line which isn't a comment, and then keep using n.

JIM

P.S. Actually, these days, the source code for more is an old version of 
less.



More information about the Novalug mailing list