Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > A stumper: how to read aliases on the command line?

A stumper: how to read aliases on the command line?
Thread Tools
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Sep 2, 2003, 07:51 AM
 
Hey everyone,

Does anyone know of
(1) a simple C program
(2) Perl or another scripting language

with which one can resolve a Mac alias from the command line?

(calling osascript doesn't count, since the Finder may or may not be running...)

Any ideas?
     
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Sep 2, 2003, 11:05 AM
 
Hmm...one could write a simple command-line app in Obj-C that used the Carbon alias-resolving methods and then echo'd the resolved path to stdout...

Edit: wouldn't have to be Obj-C, either...It's just what popped into my head. :F
[Wevah setPostCount:[Wevah postCount] + 1];
     
Senior User
Join Date: Jun 2002
Location: UK
Status: Offline
Reply With Quote
Sep 2, 2003, 12:07 PM
 
Originally posted by Mithras:
Hey everyone,

Does anyone know of
(1) a simple C program
(2) Perl or another scripting language

with which one can resolve a Mac alias from the command line?

(calling osascript doesn't count, since the Finder may or may not be running...)

Any ideas?

Mind my ignorance, but what has osascript to do with Finder?
     
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Sep 2, 2003, 12:36 PM
 
Originally posted by VEGAN:
Mind my ignorance, but what has osascript to do with Finder?
I think it might be because you have to ask the Finder what the alias's resolved path is if you use osascript (but I could be mistaken).
[Wevah setPostCount:[Wevah postCount] + 1];
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:18 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2