[H-GEN] Useful not so obvious tips

Anthony Towns aj at azure.humbug.org.au
Tue Oct 26 01:43:09 EDT 2004


On Tue, Oct 26, 2004 at 02:54:30PM +1000, Greg Black wrote:
> Then I adjust stuff until it narrows it down to a likely set of
> file names and then do
>     find . -type f -print0 | xargs -0 grep -l newstuff | xargs -0 less

I tend to find:

    less $(find . -type f -print0 | xargs -0 grep -l newstuff)

preferable here -- otherwise you're relying on less noticing that it can't
use stdin to talk to you (stdin has already been taken over by the pipe to
xargs) and making use of /dev/tty. Which is fine for less, but can cause
problems for other programs, which naturally don't come to mind right now.

(Ctrl-A gets you to the start of a line to add the `less $(', Ctrl-E to
the end of it, btw)

Cheers,
aj

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
Don't assume I speak for anyone but myself. GPG signed mail preferred.

``[S]exual orgies eliminate social tensions and ought to be encouraged.''
      -- US Supreme Court Justice Antonin Scalia (http://tinyurl.com/3kwod)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20041026/213d90ac/attachment.sig>


More information about the General mailing list