Skip to content

Show HN: Stail.sh – Short Tail

gist.github.com
2 pointsSidneys1discuss
On HN

This is a fairly short (59 LOC) utility script that allows you to tail the output of a command, but while only showing the last -n (default 5) lines of output without scrolling the output buffer. It will trim lines to the terminal width (rather than wrap them) to avoid splitting terminal escape sequences. You can also optionally -p PREFIX each line of output. Finally, it (by default) removes blank/whitespaces lines, but they can be preserved with -w.

Video of it in action here: https://i.imgur.com/VkBzA5S.mp4 (recorded with github.com/charmbracelet/vhs)

Comments

No comments yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.