LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Closed Thread
 
Thread Tools
Old 11-19-2003, 06:19 PM   #1
Hady
Member
 
Registered: Nov 2003
Posts: 55
Thanked: 0
get full path of a command (in C)


[Log in to get rid of this advertisement]
Hi!

I'm trying to write a very simple shell in C that
Prompts the user for a command,
Parses the command line,
Execute the command while passing to it the arguments passed on the command
line.

say the desired command is in variable cmd

How can i get the full path of this specific cmd??

(anything like path = getenv("PATH"); ??)

Thank you for your time.

Hady
Hady is offline    
Old 11-19-2003, 06:46 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 23,977
Thanked: 8
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

I moved your other one into programming where its more suitable.
trickykid is offline    

Closed Thread

Bookmarks


Thread Tools

Posting 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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
full path of a file ttilt Linux - General 1 11-08-2005 07:02 PM
Need to specify the full URL path.. Why? soichih Linux - Networking 3 07-31-2004 09:37 AM
get full path of a command (in C) Hady Programming 9 11-21-2003 11:50 AM
Full Path problems chedmaster Linux - Newbie 1 06-26-2003 11:24 AM
How to get executable's full path using C/C++? oldbee Programming 6 02-19-2002 10:21 AM


All times are GMT -5. The time now is 12:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration