• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unknown token in do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unknown token in do shell script


  • Subject: Re: Unknown token in do shell script
  • From: Joe <email@hidden>
  • Date: Thu, 08 Mar 2012 17:59:22 -0800

On Mar 8, 2012, at 1:13 PM, Iurista GmbH wrote:

Thanks everybody for your valued help.

I had already tried this:
tell application "Finder"
eject disk myDisk
end tell
no success   :-(

But also Doug's solution (do shell script quoted form of "diskutil unmount /Volumes/myDisk Leo") does not work...


Am 08.03.2012 um 20.38 schrieb Luther Fuller:

I just sent this to the list, but that has been slow, lately, so I'm sending a direct copy.

On Mar 8, 2012, at 12:23 PM, Iurista GmbH wrote:

I want to unmount a volume.
snip...snip...snip...

This works ...

property myDisk : alias "LutherFuller-2"

quoted form of (POSIX path of myDisk)
do shell script "diskutil unmount " & the result

This one works, but it needs nearly 15 seconds to do the job. Maybe it's because it adds a ":" at the end of the disk name in line 1 when compiling..???


But, so does this ...

tell application "Finder" to eject myDisk

This one does not work.
I dont know if this has to do with Tiger (I still use sometimes an iMac G4 "Lamp", because of Classic).


This hah worked for me since I compiled it under Tiger or maybe Leopard. It works very fast.

set whatItem to (do shell script "diskutil list | grep 'Your Disk Name'")
do shell script "diskutil unmount " & (last word of whatItem)


Joe
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Unknown token in do shell script (From: Iurista GmbH <email@hidden>)

  • Prev by Date: Re: Unknown token in do shell script
  • Next by Date: Re: Unknown token in do shell script
  • Previous by thread: Re: Unknown token in do shell script
  • Next by thread: the message app dictionary
  • Index(es):
    • Date
    • Thread