Assigning Variable to AWK statement

Hi,

The following command runs on in the Korn shell prompt. however i want to output the value of this to a variable. Can anyone provide a solution?

echo 'ABC,DEF,"G,HI,J",KLM,"MNi,O"'| awk -F "\"" '{for(i=1;i<=NF;i++){if(i%2)gsub("\,","~^~",$i)}}1'

var=`your command here`
var=$(your command here)

Hi ghostdog74,

Thanks,

That works...