#!/bin/sed -f # # DEDICATED TO THE PUBLIC DOMAIN # # Demonstrate colorizing output for standard shells using sed. # # Attribute codes: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed s/anone/&/g s/abold/&/g s/aunderscore/&/g s/ablink/&/g s/areverse/&/g s/aconcealed/&/g # Text color codes: # # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan # 37=white s/fgblack/&/g s/fgred/&/g s/fggreen/&/g s/fgyellow/&/g s/fgblue/&/g s/fgmagenta/&/g s/fgcyan/&/g s/fgwhite/&/g # # Background color codes: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan # 47=white # s/bgblack/&/g s/bgred/&/g s/bggreen/&/g s/bgyellow/&/g s/bgblue/&/g s/bgmagenta/&/g s/bgcyan/&/g s/bgwhite/&/g # # combinations # s/bdred/&/g s/ungreen/&/g s/yelblu/&/g s/revyb/&/g # # Colorize this document, comments are cyan s/#.*$/&/g