Re: wrapit / cd

From: Rick Grubin <grubin_at_nyahnyahspammersnyahnyah>
Date: Thu, 1 Nov 2007 08:37:05 -0600

Hi Mike

> Thanks. I know how to loop through the directory names and even
> change directories, but how do I execute wrapit from each of those
> directories?
>
> If I use system(cd ...) and then on the next line, execute wrapit,
> it will not run the .so file in that directory since the system
> command is temporary.

To execute multiple commands from one call to NCL's 'system()'
command, you'll need to string together those commands using the
shell's syntax for doing so. For both csh and sh shell variants, you
can use the semicolon to do this. As a trivial example:

        system("cd " + dir + "; WRAPIT ...")

For both NCL's 'system()' and 'systemfunc()' commands, there are
examples that demonstrate how to string together commands:

        system: http://www.ncl.ucar.edu/Document/Functions/Built-in/
system.shtml see example #4 and #5
        systemfunc: http://www.ncl.ucar.edu/Document/Functions/Built-in/
systemfunc.shtml see example #5

-Rick.
----
Rick Grubin NCAR/TDD/CISL/VETS
Visualization + Enabling Technologies
grubin_at_ucar.edu 303.497.1832

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 01 2007 - 08:37:05 MDT

This archive was generated by hypermail 2.2.0 : Fri Nov 02 2007 - 10:04:33 MDT