chkconfig with color on centos

alias chkconfig="chkconfig | perl -pe 'use Term::ANSIColor; s/\bon\b/color(\"green\").on.color(\"reset\")/ige;'"

or to permit passing an agrument:

function chkconfig(){
    /sbin/chkconfig $* | perl -pe 'use Term::ANSIColor; s/\bon\b/color("green").on.color("reset")/ige;'
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.