Bash script text line into an array
I am trying to read a command and pipe each line into an array.
I want to read:
$chkconfig --list
After I read that command I want to parse each line into 2-d array.
I figure out out to get first line with awk, but not sure how to make it loop till EOF.
$chkconfig --list, when output is just one big text word. It does not preserve the newlines. I wish I token on newlines instead "6:off", because we know runlevel 6 will be off(or should be)
Anyone got in good resources I could look at?
Last edited by toolshed; 06-13-2005 at 02:20 PM.
|