SHARE
TWEET

Highlight whitespace on the terminal

a guest Jul 14th, 2011 75 Never
  1. #! /bin/sh
  2. # Highlight whitespace on the terminal
  3. #  -- rolfwr
  4. reset=$(printf '\033[0m')
  5. color=$(printf '\033[0;36m')
  6.  
  7. cat $@ | sed -e "
  8. s/      /${color}▹▹▹▹▹▹▹▹${reset}/g
  9. s/ /${color}·${reset}/g
  10. s/$/${color}${reset}/"
RAW Paste Data
Top