How to hide a password from a prompted osascript dialogue from a Mac/UNIX Shell Script
Use with hidden answer
. Link:
osascript -e 'Tell application "System Events" to display dialog "Enter the network password:" with hidden answer default answer ""' -e 'text returned of result' 2>/dev/null