Skip to content

Instantly share code, notes, and snippets.

@n-johnson
Created April 1, 2016 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n-johnson/ab8e5c5c9d75d976b0ad276e4b2296e3 to your computer and use it in GitHub Desktop.
Save n-johnson/ab8e5c5c9d75d976b0ad276e4b2296e3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Takes a parameter PREFIX and then prepends it to all stdin passed through
PREFIX="$1"
awk -v p="$PREFIX" '{ print "\033[90m[" p "]\033[0m" , $0; fflush(); }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment