Skip to content

Instantly share code, notes, and snippets.

@monester
Created January 8, 2018 15:36
Show Gist options
  • Save monester/e49b6299ec7399bfb2548beeeb709cf5 to your computer and use it in GitHub Desktop.
Save monester/e49b6299ec7399bfb2548beeeb709cf5 to your computer and use it in GitHub Desktop.
#!/bin/sh
# usage: tailnew < /var/log/messages
awk 'BEGIN{getline l<"/tmp/tailnew"}(NR>l){print;l=NR}END{print l>"/tmp/tailnew"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment