Link to home
Start Free TrialLog in
Avatar of pai
pai

asked on

Read a file following $PATH

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!
Avatar of pai
pai

ASKER

Adjusted points from 50 to 100
For which OS. There are no ansi function which will do this. The POSIc function for these are

opendir, readdir, scandir, closedir, ...
Avatar of pai

ASKER

Sorry, I forgot to mention it is in Linux. Could you give an outlined example as how it works?
ASKER CERTIFIED SOLUTION
Avatar of rbr
rbr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pai

ASKER

The answer is good. You should post it here.