Shell argv
Mark Waddingham
mark at livecode.com
Mon May 8 12:56:26 EDT 2017
On 2017-05-07 03:46, JB via use-livecode wrote:
> To use a shell command it needs to work from
> the terminal. I am using OS X 10.11.6 and if
> I try to open a Xcode c build named my_file I
> type in the terminal,
>
> open my_file
>
> and the file my_file will open.
What is 'my_file'?
The terminal command 'open' looks at the filename, works out what app it
should be opened by and then launches the file in that app.
For example:
open foo.c
Will open 'foo.c' (as a editable text file) in Xcode on my machine.
The '--args' portion of the open command allows you to pass extra
arguments to the application which is chosen to open the file.
> The argument never gets passed. Does anyone
> know how to pass arguments to argv from the
> terminal when open a file so I can use the script
> from a shell command?
What exactly are you trying to do?
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list