[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 - 13:29:11 CEST
This archive was generated by hypermail 2.3.0
: Tue Apr 02 2013 - 13:36:05 CEST