Jump to content

script for Verbose Booting


Xanix
 Share

3 posts in this topic

Recommended Posts

Hello. I wanted to make a script for activating Verbose Booting but it doesn't accept " on the end.

 

The script was like this:

 

tell application "Terminal"

do script "sudo /usr/sbin/nvram boot-args="-v""

do shell script "sudo -K"

end tell

 

and this one:

 

tell application "Terminal"

do script "sudo /usr/sbin/nvram boot-args="""

do shell script "sudo -K"

end tell

 

The problem is that I can't place " on the end!

 

Whou can I make it work?

 

Thank's in advance

 

Best regards,

 

Xanix

Link to comment
Share on other sites

Escape your slashes. Otherwise, the shell sees:

do script sudo /usr/sbin/nvram boot-args=

Since the quotes around -v were considered to be closing the first part and opening a second string. It should be:

 

do script "sudo /usr/sbin/nvram boot-args=\"-v\""

do script "sudo /usr/sbin/nvram boot-args=\"\""

Link to comment
Share on other sites

Escape your slashes. Otherwise, the shell sees:

do script sudo /usr/sbin/nvram boot-args=

Since the quotes around -v were considered to be closing the first part and opening a second string. It should be:

 

do script "sudo /usr/sbin/nvram boot-args=\"-v\""

do script "sudo /usr/sbin/nvram boot-args=\"\""

 

 

Thank you. That was done it!

Scripts done and working.

 

Best regards,

 

Xanix

Link to comment
Share on other sites

 Share

×
×
  • Create New...