• 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: Drag and drop onto BSD command line tool?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop onto BSD command line tool?


  • Subject: Re: Drag and drop onto BSD command line tool?
  • From: Scott Ribe <email@hidden>
  • Date: Sat, 17 May 2014 18:09:08 -0600

On May 17, 2014, at 6:02 PM, Bob Sabiston <email@hidden> wrote:

> It doesn’t just pass the name, it passes a list of arguments.  So I had to put this in the Run Shell Script window:
>
> for f in "$@"
> do
> myScript "$f"
> done
>
> Thanks for the help!

Right. And if there's only 1 argument, then you only need

myScript "$1"

No need to loop over the list for 1 argument...

Of course, you might want to check the number of arguments before assuming there's only 1 and skipping the rest of the list. (Or, as with the answer in that thread, running with arg 1 for each arg provided...)

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Drag and drop onto BSD command line tool? (From: Bob Sabiston <email@hidden>)
 >Re: Drag and drop onto BSD command line tool? (From: Scott Ribe <email@hidden>)
 >Re: Drag and drop onto BSD command line tool? (From: Scott Ribe <email@hidden>)
 >Re: Drag and drop onto BSD command line tool? (From: Bob Sabiston <email@hidden>)

  • Prev by Date: Re: Drag and drop onto BSD command line tool?
  • Next by Date: Re: Not getting mouseDown: called when control-clicking in view in menu item
  • Previous by thread: Re: Drag and drop onto BSD command line tool?
  • Next by thread: mavericks style tabs
  • Index(es):
    • Date
    • Thread