Skip to content

Instantly share code, notes, and snippets.

@lmlsna
Last active October 14, 2021 08:46
Show Gist options
  • Select an option

  • Save lmlsna/a1b445af8201d25ad7f87d812d620023 to your computer and use it in GitHub Desktop.

Select an option

Save lmlsna/a1b445af8201d25ad7f87d812d620023 to your computer and use it in GitHub Desktop.
hilite - Bash script to colorize arguments found in passed stdin text
#!/bin/bash
# Hightlights arguments from piped in text
cat - | grep --color=auto -E -i "^|$(echo "$*" | sed 's/ /|/g')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment