Skip to content

Instantly share code, notes, and snippets.

@dlfinis
dlfinis / tailf.sh
Created March 25, 2019 16:34
Complete read of a file with tail and color
#!/bin/sh
tail -f ${@:1} | sed --unbuffered \
-e 's/\(.*INFO.*\)/\o033[90m\1\o033[39m/' \
-e 's/\(.*NOTICE.*\)/\o033[37m\1\o033[39m/' \
-e 's/\(.*WARNING.*\)/\o033[33m\1\o033[39m/' \
@dlfinis
dlfinis / inputrc
Created May 11, 2021 15:41 — forked from snipe/inputrc
~/.inputrc for nice bash history up-arrows. This allows you to search through your history using the up and down arrows … i.e. type "cd /" and press the up arrow and you'll search through everything in your history that starts with "cd /". Create ~/.inputrc and fill it with this:
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on