I've got a variable that I define based on the contents of a field in a pipe delimited text file (read into $REC) as follows:
TEMP=${echo $REC|awk '-F|' '{print $1}')
echo $TEMP gives me:
"$X1" "$X2" "$X3"
How can I then split this up to pass each of the quote delimited parameters into another script? I need to retain the double quotes and there can be a variable number of space delimited parameters in $TEMP. For example, I want to be able to run:
test_script.sh "$X1" "$X2" "$X3"
Thanks.