|On Thu, 16 May 2002, Renato Gomes Damas wrote:
 |> How can I pass a parameter to .net file via "dx -script ..." command ?
 |>
 |> I want to pass a file name to my .net file via command line !!!

Eelco Van Vliet's solution is a good one.  In the past I've used a slightly
different variation that gives you a little more flexibility:

Encapsulate your DX script logic in macros, and build a short DX script in
your shell script to invoke the macros.  For example:

   #!/bin/sh -e

   ...

   for coverage in $COVERAGES; do
     ...
     for bea in $BEAS; do
       ...
       dx -script << EOF
       include "bea_image_clip.scr"
       ClipImageToBEAPolygon( image_path         = "$maia_image", 
                              maia_polygons_path = "$BEA_POLYGON_FILE",
                              bea_name           = "bea${bea}", 
                              outpath_base       = 
"$MODEL_INPUT_PATH/bea${bea}/GIFS/bea${bea}.${coverage}" );
   EOF

       done
     done

You can use shell variables as usual in the body of the script you're
feeding to DX.

Randy

-- 
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA N127-01; RTP, NC 27711

Reply via email to