Q: Single backslash in string possible?
This is basically what I'm trying to do. Creating a bootdisk for Yosemite. This is an extract of the full script. I basically will take the runIt variable and use it like so:
do shell script runIt
formatname would be the name of the disk I select, from a selection of thumb drives available.
No matter what I try I can't get runIt to set single backslashes for the areas with spaces between. I tried double backslash, ascii character, concatenation and nothing has worked for me yet. The result is always double backslashes. I tried up to 4 consecutive slashes already. Is this even possible?
MacBook Pro, OS X Yosemite (10.10.3)
Posted on Jun 11, 2015 10:41 PM
You're entering the backslashes properly in your current script; the second backslash in each pair is used to escape the first and won't be passed to the shell.
For example, running:
do shell script "ls /Volumes/Macintosh\\ HD/"
will be passed to the shell as:
ls /Volumes/Macintosh\ HD/
(128653)
Posted on Jun 11, 2015 10:46 PM



