Replace whitespace by backslashes using AppleScript

76 Views Asked by At

I'm using the following command to get a mount point from a disk:

do shell script "diskutil info /dev/disk4s1 | sed -n 's/.*Mount Point: *//p'"

however if I have two disks with the same name it returns the second one as something like this:

"/Volumes/myDisk 1"

I would like to get the following output:

"/Volumes/myDisk\\ 1"

how can i do this using Applescript-objc?

0

There are 0 best solutions below