[Top][All Lists]

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

Re: [coreutils] [PATCH] head: optionally indicate underrun of set limit

From: Pádraig Brady
Subject: Re: [coreutils] [PATCH] head: optionally indicate underrun of set limit
Date: Thu, 25 Nov 2010 16:34:39 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100227 Thunderbird/3.0.3

On 25/11/10 16:17, Stefan Tomanek wrote:
> Dies schrieb Pádraig Brady (address@hidden):
>> process_part() { echo processing $(wc -c) bytes; }
>> while true; do
>>   c=$(od -tx1 -An -N1)
>>   test "$c" || break
>>   c=$(echo $c) #strip leading ' '
>>   { printf "\x$c"; head -c9; } | process_part
>> done

> That's actually a neat idea, I'll see if I can adapt this
> for my purpose. But you must admit that having a modified
> 'head' to replace the od/test/echo/printf part would be a
> nice thing?

Well I'm much less convinced now after realizing
that it didn't allow for a general solution.
Note the `od` above might seem a bit obtuse,
but it's really equivalent to and follows from
`head -c1 | hexdump`


reply via email to

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