You can also get PlistBiddy to print the value directly instead of
parsing it out: loggedInUser=$(/bin/ls -l /dev/console | /usr/bin/awk
'{print $3}') AADUSERID="$(/usr/libexec/PlistBuddy -c 'Print:aadUserId'
/Users/$loggedInUser/Library/Application\...