groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU extensions to Unix commands (was: All caps .TH page title)


From: Ralph Corderoy
Subject: Re: GNU extensions to Unix commands (was: All caps .TH page title)
Date: Sun, 24 Jul 2022 13:44:28 +0100

Hi Alex,

> >      $ grep -m1 ^ `find -type f | sort -f | uniq -Di`
>
> I'm a big fan of pipes and xargs(1).  I only use `` or $() when I
> _really_ need to.  I'd use:
>
> $ find -type f | sort -f | uniq -Di | xargs grep -m1 ^

I too use xargs(1).  But beware its defaults.  Unless I know the nature
of its input, I default to

    find -type f | sort -f | uniq -Di | xargs -rd\\n grep -m1 ^

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]