Trying to update the Email attribute

New Contributor

Hey everyone I am trying to set a custom variable to update the -email attribute via a jamf recon. So please have mercy on me :

get Email Address

customemail="$(/usr/bin/osascript -e 'Tell application "System Events" to display dialog "Please enter your company email address:" default answer "" with title "Set Email address" with text buttons {"OK"} default button 1 with icon 1' -e 'text returned of result')"

sudo jamf recon -email $customemail

exit 0

I tried running this to no avail. Any help would be greatly appreciated