|
|
Location-aware .command Files
.command are mapped to Terminal.app in Mac OS X. If their executable flag is set, they are automatically executed. This is a way of putting shell scripts into double-clickable files, and the executable flag requirement helps with the malicious code issue somewhat (but not very much).
The usefulness of these double-clickable files are somewhat limited as it's nonobvious how to get them to act on the contents of the folder they live in. For your pleasure, here's a technique to make the script
Update: I've also figured out a way for BBEdit worksheets to discover and switch into their enclosing folders:
Funtastic. Update #2: Malte Tancred told me about Update #3: None other than the famous Randal L. Schwartz, perl writer extraordinaire, wrote me to point out a fatal error in the I actually ran into this when Malte mailed me his example, but didn't figure it out. Anyway, Randal does more than just point out the error of my ways -- he offers a solution in the form of shell escaping. Here's code that should work:
Thanks for the help, Randal! Just ignore the entire perl is the spawn of satan thing. (grin)
Follow-up to that meeting: I should qualify that link before I get flamed by perl lovers. Turns out Bradley "cheated" and brought a local perl user group leader ( Update #4: Apparently
Wednesday, March 05, 2003
|
Contact Me Topics RSS Feed Linkblog
Bill Bumgarner Brent Simmons Daniel Jalkut Dave Dribin Eric Albert Eric Rescorla Eric Sink Greg Miller Gus Mueller Jeremy Zawodny John Gruber Mark Dalrymple Michael Tsai Peter Ammon Raymond Chen Ryan Wilcox Scott Stevenson Steven Frank The Daily WTF we hates software Wil Shipley |
Copyright © 1997-2008 Jonathan 'Wolf' Rentzsch. All rights reserved.
Questions? Comments? Contact Me.