Bash capturing output of awk into array
Add additional parentheses, like this:
myarr=($(ps -u kdride | awk '{ print $1 }'))# Now access elements of an array (change "1" to whatever you want)echo ${myarr[1]}# Or loop through every element in the arrayfor i in "${myarr[@]}"do : echo $idone
See also bash
— Arrays.