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 > Developer Center > full path in terminal

full path in terminal
Thread Tools
lenz
Registered User
Join Date: Apr 2001
Status: Offline
Reply With Quote
Jul 6, 2002, 08:35 PM
 
My question is about obtaining the current path the user is in when a command is executed. For example, if the user executes the following in the terminal:

cd /some/path
./ myProgram -someOption theFile

I want to find theFile without having the user to enter the full path if theFile is in the current directory(/some/path).

Thanx
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jul 6, 2002, 09:27 PM
 
Try getcwd().
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
 
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
Top
Privacy Policy
All times are GMT -4. The time now is 03:05 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,