ETOOBUSY 🚀 minimal blogging for the impatient
Heail - head and tail together
heail is a little Perl program to get the head and tail of
the input at the same time:
If you’re wondering, its name comes from merging head with tail. Well, I didn’t like heil.
Call like this:
some-command | heail 5 # keep 5 lines from head and 5 lines from tail
$ for i in $(seq 1 10); do printf %s\\n "$i"; done | heail 3 1 2 3 ... 8 9 10
It tries to do the right thing if the number of available lines fit within both limits.
There’s plenty of space for improvement… and for suggesting the right tool to do this. Waiting!
Comments? Octodon, , GitHub, Reddit, or drop me a line!