Chkconfig output
Hi all,
For example, when i type the command "chkconfig --list xfs". I will get the result " xfs 0: off ... 3: on 4: on 5: on 6: off". But what if i only want to see whether runlevel "3" and "5" is on or off? So what command can i actually use to grep that particular output? Thanks! Regards JS W |
A more concise approach notwithstanding, the below will work
To see only 5: Code:
chkconfig --list xfs | sed 's/.*5\: \([ofn]* \).*/\1/' Code:
chkconfig --list xfs | sed 's/.*3\: \([ofn]* \).*/\1/' |
All times are GMT -5. The time now is 06:42 AM. |