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}/"