Solved

Read a file following $PATH

Posted on 2000-05-08
5
185 Views
Last Modified: 2010-04-15
How do I read a file following $PATH if it is not in current directory. I mean, are there methods to easily do that instead of dissecting $PATH string and try to find the file directory by directory? Thanks!
0
Comment
Question by:pai
  • 3
  • 2
5 Comments
 

Author Comment

by:pai
Comment Utility
Adjusted points from 50 to 100
0
 
LVL 10

Expert Comment

by:rbr
Comment Utility
For which OS. There are no ansi function which will do this. The POSIc function for these are

opendir, readdir, scandir, closedir, ...
0
 

Author Comment

by:pai
Comment Utility
Sorry, I forgot to mention it is in Linux. Could you give an outlined example as how it works?
0
 
LVL 10

Accepted Solution

by:
rbr earned 100 total points
Comment Utility
Send an email to rbr@tip-informatik.at
and I will send you an example.
0
 

Author Comment

by:pai
Comment Utility
The answer is good. You should post it here.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now