Re: [dev] print utility

From: hiro <23hiro_AT_gmail.com>
Date: Tue, 2 Apr 2013 15:19:25 +0200

Sam Watkins was just testing him, now you spoiled it, lol.

On 4/2/13, markus schnalke <meillo_AT_marmaro.de> wrote:
> [2013-04-02 15:23] Sam Watkins <sam_AT_nipl.net>
>>
>> I suggest to extend your program so it can also print a range of lines
>> (and thus subsume the functions of 'head' and 'tail' while doing more
>> and yet staying fairly focused). You could perhaps use negative numbers
>> to count back from the final line. It should be able to cut off 6 lines
>> from the end of a file, or print from lines 10 through to the 2nd-last
>> line.
>
> Please don't write this tool as it is already available: ed(1):
>
> echo '1,$-6p' | ed - "$1"
> echo '10,$--p' | ed - "$1"
>
> Better learn about software leverage!
>
>
> meillo
>
>
Received on Tue Apr 02 2013 - 15:19:25 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 02 2013 - 15:24:05 CEST