How to hide a password from a prompted osascript dialogue from a Mac/UNIX Shell Script How to hide a password from a prompted osascript dialogue from a Mac/UNIX Shell Script unix unix

How to hide a password from a prompted osascript dialogue from a Mac/UNIX Shell Script


Use with hidden answer. Link:

https://developer.apple.com/library/mac/documentation/applescript/conceptual/applescriptlangguide/reference/aslr_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW12

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