The value of the variable EXP is specified between ", so the shell interprets the value before affectation.
$6 is replaced by the value of argument 6 which seems to be be not set in your case.
Protect $6 with \ to avoid substitution:
Code:
export DEV="/usr/sbin/diskutil list | /usr/bin/grep Master | /usr/bin/awk '{ print \$6 }'"
or use simple quotes ', in that case internals simple quotes must be protected :
Code:
export DEV='/usr/sbin/diskutil list | /usr/bin/grep Master | /usr/bin/awk \'{ print $6 }\''
Jean-Pierre.