|
From: Petr M. <mi...@ph...> - 2006-03-04 22:13:29
|
> Here's another. The new function does not recognize pipes
The routine fileexist() is for files only; it makes no sense for pipes.
For pipes, do
if (fileexist('a.dat')) plot '<tr . , a.dat'
> gnuplot> !printenv GNUPLOT_LIB
It looks for the file in the current directory by default.
> was a clever idea to use GNUPLOT_LIB to point to any one of
> several data directories:
Then, there is a need for function (taking the name from Octave)
file_in_loadpath(name)
We can add it.
=> return the absolute path/name for the given file anywhere along the
loadpath.
Then, you could use either of
if (fileexist(f))
if (fileexist(file_in_loadpath(f)))
> Anyhow, is there anysystem that provides "ls" that does not also
> provide "find"?
On OS/2 and Windows
- there is no "ls" by default
- there is "find", but with completely different syntax from GNU find
> if (defined(VAR))
Thanks, that I was looking for (in Octave & Matlab, it's called exist()).
---
PM
|