Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clear all breakpoints




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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Clear all breakpoints (From: "R.L. Grigg" <email@hidden>)
 >Re: Clear all breakpoints (From: Chris Espinosa <email@hidden>)
 >Re: Clear all breakpoints (From: Laurence Harris <email@hidden>)
 >Re: Clear all breakpoints (From: Steve Checkoway <email@hidden>)
 >Re: Clear all breakpoints (From: Steve Checkoway <email@hidden>)
 >Re: Clear all breakpoints (From: Jim Wrenholt <email@hidden>)
 >Re: Clear all breakpoints (From: Steve Checkoway <email@hidden>)
 >Re: Clear all breakpoints (From: Markus Hitter <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.