[LAU] How to post selected contend of a configuration file Was: OT - Re: Kernel 2.6.39 Re: Linux-audio-user Digest, Vol 52, Issue 33

R. Mattes rm at mh-freiburg.de
Thu Jun 23 16:58:16 UTC 2011


On Thu, 23 Jun 2011 18:00:57 +0200, Emanuel Rumpf wrote
> 2011/6/23 S C Rigler <riglersc at gmail.com>:
> 
> > ...
> > Grep is fully capably capable of matching lines directly from the file
> > so you don't need anything piping the file to it.  ...
> 
> Now, what if the file is compressed ?
> 
> There is
> bzless config.tar.bz2 | grep PREEMT*
> 
> would that somehow work pipeless ?

bzgrep?

> > $ less config-2.6.39.1 | grep PREEMPT
> 
> It's also possible with the angle bracket
> <config.txt  grep PREEMT*
> 
> BUT: I really would NOT recommend that.
> If you accidentally reverse the bracket (>), you've lost....

So why do you even mention it? 
But the most important point is: _don't_ use 'less' on places other than
the end of a pipe! Less is a pager whose task is to pretty-print streams
so they are human readable. Less _does_ possible modify the stream. I'll
escape transmogrify certain control characters. If you try to use zless/grep
to search for a control sequence you might be up for a surprise ...

 Cheers, RalfD

> -- 
> E.R.
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user at lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-user


--
R. Mattes -
Hochschule fuer Musik Freiburg
rm at inm.mh-freiburg.de



More information about the Linux-audio-user mailing list