in reply to Re^2: Making chkconfig's output readable
in thread Making chkconfig's output readable
I really liked your idea. I couldn't help but golf a little. I only output what's on.
/sbin/chkconfig --list | perl -nle '$s=(split)[0];s/(\d):on/$a{$s}.=$1/ge;s/(\w+):\s+(on)/$a{"xinetd -> $1"}=$2/e; END{print "$_: $a{$_}" for sort keys %a}'
Score
yours: 186 swings; 147 swings if I turn all your vars into single characters.
mine: 116 swings.
Just having fun!