[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposed new feature: head --show-truncation
From: |
Ed Avis |
Subject: |
Re: Proposed new feature: head --show-truncation |
Date: |
Thu, 21 Aug 2003 12:55:30 +0100 (BST) |
On Thu, 21 Aug 2003, Stepan Kasal wrote:
>>A reasonable argument against --show-truncation would be to
>>demonstrate that it can be done with a trivial shell script wrapping
>>head itself.
>
>What about
>
>n=2
>cat ~/todo | (head /dev/null; sed $n'!b;n;s/.*/[[trunc]]/;q')
I can't get this command to work:
Label too long: 2!b;n;s/.*/[[trunc]]/;q
In any case, it doesn't seem to be a wrapper for head.
[other script snipped]
>I mean that trivial shell script which doesn't use "head" should
>also count.
No, because by that argument at least half of the classic Unix
utilities would be eliminated. I am hoping to consider whether the
--show-truncation flag makes head more powerful, in that it couldn't
be emulated by the existing head plus a couple of lines of
shell.
--
Ed Avis <address@hidden>