root# dscl . -change /Users/default RealName "Brian" "David"
When running this command in Terminal the Full Name of the user that is associated with home folder "default" is changed from Brian to David.
However when I try to run this command in ScriptEditor I get a syntax error.
do shell script "dscl . -change /Users/default RealName "Brian" "David""
The second double quote breaks the syntax because it indicates the end of the literal shell script argument. You can even see it in the source text (syntax highlighting).
I guess the double quotes around the names are not needed so it's simply
However if the double quotes are required you have to escape them