Created
May 16, 2018 08:30
-
-
Save inetic/38624c31ed6fa386814f5dafb8a97235 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbuf='stdbuf -i0 -o0 -e0' | |
function now { | |
date +'%M:%S' | |
} | |
# usage: ./my-program 1> >(prepend my-program-tag) 2>&1 & | |
function prepend { | |
while read line; do echo "`now` $1| $line"; done | |
} | |
function fork { | |
gnome-terminal -x bash -c "$@" | |
} | |
function title { | |
# Set title in gnome-terminal | |
echo -ne "\033]0;$@\007" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment