[ncl-talk] system/systemfunc commands

M P mzp3769 at gmail.com
Sun May 17 12:22:25 MDT 2020


Thanks, the new code and response are below. I also modified the code after
Dave's suggestion
but that does not improve.
I am sorry but that is a bummer,
Mark

(directory "./test" exits)
begin

   ncldir="./test"
   command="cd " + ncldir

   system("pwd")
   system(command)
   print(systemfunc(command))
   system("pwd")

end

..../mapp/ncl
(0)     missing
..../mapp/ncl

begin

   ncldir="./test"
   command="cd " + ncldir + "; pwd"

   system("pwd")
   system(command)
   print(systemfunc(command))
   system("pwd")

end

.../mapp/ncl
.../mapp/ncl/test
(0)     .../mapp/ncl/test
.../mapp/ncl




On Sun, May 17, 2020 at 12:01 PM Rick Brownrigg <brownrig at ucar.edu> wrote:

> Is it possible the system(command) call is failing?  Try something like
> this to verify:
>
>      print(systemfunc(command))
>
> Rick
>
> On Sun, May 17, 2020 at 11:33 AM M P via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Hello,
>> I have a simple test script that is not doing the right thing.
>> The output is the same for both first and second system calls
>> so that the directory is not changed.
>> Can you help with a solution?
>> Thanks,
>> Mark
>>
>> begin
>>
>>    ncldir="./test"
>>    command="cd " + ncldir
>>
>>    system("pwd")
>>    system(command)
>>    system("pwd")
>>
>> end
>>
>> ..../mapp/ncl
>> ..../mapp/ncl
>>
>> (same with systemfunc)
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200517/0b9487f9/attachment.html>


More information about the ncl-talk mailing list