In a bash script, I need to pass a parameter to another program. The parameter has spaces in so must be quoted. Everything works fine in this simple case 1:
/bin
You are almost there. You just have to put the $DEFAULTS into double quotes so that bash doesn't do the word spliting.
$DEFAULTS
DEFAULTS='param="ac def ghi"' perl -le'print $ARGV[0]' "$DEFAULTS"
Output:
param="ac def ghi"