|
|
A cleaner and safer alternative
The original script uses far too many variables, and more commands than it should. It is also unreliable. The AppleScript needs more parentheses. The cleaned up version in the comments isn't much better; it still fails most of the time. Some of the problems with the alias path scripts are:
#!/bin/sh[Editor's note: _merlin, aka Vasantha Crabb, has written a number of AppleScripts for the site and knows this stuff much better than I do! Thanks for providing a cleaned up version of the script!]
A cleaner and safer alternative
[linktest]$ ./apath2 ./linktestalias
A cleaner and safer alternative
I don't know why you're getting that message, I haven't got anything like it in my tests. It won't affect things like "cd `dirname `apath an_alias``", because only the standard output will be fed through the commands, the error output will just be printed on the terminal.
A cleaner and safer alternative
If I remember rightly this is caused by a Toast titanium file that's put in the quicktime folder... hmm,
A cleaner and safer alternative
> Go into /Library/QuickTime and move 'Toast Video CD Support.qtx' somewhere else (err, maybe the Trash!!).
A cleaner and safer alternative
Thanks to everyone for cleaning up my script! I just modified another script to get the result I was after, but you have shown me a more efficient way to do it.
A cleaner and safer alternative
It's smooth!
A cleaner and safer alternative
Nice solution, but it does require running Finder. Is there any way to access this information via python (or perl, or whatever) and direct system calls rather than by invoking Finder? Having to run a GUI-based app to get information used in a command-line script seems inelegant at best. If you can get at this information via a C program it should be available via something like python (if someone has written the necessary code).
A cleaner and safer alternative
I was thinking the same thing, actually, when I first started using Tiger.
The closest command line tool that can help is Tiger's
Unfortunately, while I still have the remnants of the perl script that I started writing back then to do what this particular script does. I'm not happy having to run oascript to get the reference to an alias...
(By the way, the Spotlight attributes can be used in the shell script above to verify that the file passed to —lar3ry |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|