|
From: Tait <gnu...@t4...> - 2009-02-03 01:08:31
|
> > Further I have noticed `pwd` command from shell is needed to set a variable
> > for the current working directory because
> > gnuplot> pwd
> > just prints it to screen, but I cannot do
> > a=pwd
> > or a=eval pwd
>
> The "pwd" command from the shell is needed in any case. It is only a matter
> of whether it is called directly or called via the internal routine pwd_command().
> I would do
> a = system("pwd")
gnuplot> a=system("pwd")
warning: system evaluation not supported by MS-Windows 32 bit
gnuplot> pwd
C:\Program Files\gnuplot\bin
gnuplot>
So there is a need for something portable, and it's not system("pwd").
> I don't know. I don't think that the concept of "current working directory"
> is universally portable even apart from how you would issue the command.
> In VMS, for example, the current directory name and the current disk are
> separate things. Just asking for the current directory would not tell you
> what disk you would be writing to.
In Windows, the drive is given as part of pwd, so it would make sense,
I think, to emulate the same behavior in VMS and return the full path,
diskname$foo:[path.to.dir].
Tait
|