Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Making chkconfig's output readable

by TVSET (Chaplain)
on Dec 16, 2004 at 10:38 UTC ( #415322=note: print w/replies, xml ) Need Help??

in reply to Making chkconfig's output readable

I don't see what is wrong with chkconfig's output. If you are interested in one specific service you can do either "chkconfig --list someservice" or "chkconfig --list | grep someservice". If you want to know which services run in runlevel 2, you can do "chkconfig --list | grep 2:on".

Replies are listed 'Best First'.
Re^2: Making chkconfig's output readable
by petdance (Parson) on Dec 18, 2004 at 05:57 UTC
    I want to look at all of them, at a glance. The "on" and "off" strings are unnecessarily obscuring. The best way to say "no" is with whitespace. It makes you think, rather than make the answers incredibly obvious.

    Do you honestly not see the difference between the default output and what I put together?


      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!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://415322]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2020-08-13 15:19 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (74 votes). Check out past polls.