Re: Clear all breakpoints
Re: Clear all breakpoints
- Subject: Re: Clear all breakpoints
- From: Steve Checkoway <email@hidden>
- Date: Wed, 24 Oct 2007 03:21:31 -0700
On Oct 24, 2007, at 2:52 AM, Markus Hitter wrote:
Am 19.10.2007 um 01:04 schrieb Steve Checkoway:
The first line "#! /bin/sh" is telling the OS that you want to run /
bin/sh and give it the script file. Then when you have "#!/usr/bin/
osascript" it's just a comment so it gets ignored.
Try "#!/usr/bin/osascript -e"
No, that's clearly not going to work. The interpreter named on the #!
line is passed the file as an argument. osascript uses -e for an
expression passed on the command line.
steve$ cat bah
#!/usr/bin/osascript -e
tell application "Finder" to activate
steve$ ./bah
0:1: syntax error: A unknown token can’t go here. (-2740)
Remove the -e and the finder activates.
Consider:
steve$ cat args.c
#include <stdio.h>
int main( int argc, char **argv )
{
while( argc-- )
puts( *(argv++) );
return 0;
}
steve$ gcc -Wall -o args args.c
steve$ cat bah2
#!/Users/steve/temp/args arg1 arg2
foo bar
steve$ ./bah2
/Users/steve/temp/args
arg1
arg2
./bah2
As you can see, it passes the arguments and the name of the file as
invoked to the interpreter (in this case the args program).
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden