Re: Drag and drop onto BSD command line tool?
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