Skip to content

Instantly share code, notes, and snippets.

@jpzhu
Created November 5, 2013 06:08
Show Gist options
  • Save jpzhu/7314643 to your computer and use it in GitHub Desktop.
Save jpzhu/7314643 to your computer and use it in GitHub Desktop.
highlight a work in terminal
txtred=$(echo -e '\e[0;31m')
txtrst=$(echo -e '\e[0m')
hl(){
sed -e "s/$1/${txtred}&${txtrst}/g" $2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment