Skip to content

Instantly share code, notes, and snippets.

@inetic
Created May 16, 2018 08:30
Show Gist options
  • Save inetic/38624c31ed6fa386814f5dafb8a97235 to your computer and use it in GitHub Desktop.
Save inetic/38624c31ed6fa386814f5dafb8a97235 to your computer and use it in GitHub Desktop.
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