I got annoyed at having to know how many lines I want to `head` or `tail`, and having to write the same stuff over and over again using `cat -n` / `grep` (or even worse an awk script) to figure them out on the fly, so ... two new scripts, `ignore-after` and `ignore-up-to` which are basically content-based versions of `head` and `tail`.

You're welcome.

https://github.com/DrHyde/shellscripts/commit/73b79e211ebaacbb9bc4f296fd1db6d2174b6f9e

#ShellScripting #shell #unix

ignore-after and ignore-up-to: content-based versions of head(1) and … · DrHyde/shellscripts@73b79e2

…tail(1)

GitHub

Yes, I was tempted to write them in terms of car and cdr, and to write shell versions of those, but I wanted to actually get shit done instead of channelling #JohnMcCarthy. Also, https://xkcd.com/224/

#Lisp

Lisp

xkcd
@DrHyde isn't that just sed '/foo/q' and sed -n '/foo/,$ p'?