Thread: Macro 'run' command

Started: 2006-07-07 17:32:07
Last activity: 2006-07-07 21:09:18
Topics: SAC Help
jcalkins@geo.arizona.edu
2006-07-07 17:32:07
Hi,

I'm trying to get a macro to kick off a shell script using the 'run...
endrun' commands and not having any luck. Here's the test macro:
RUN ./test_script
ENDRUN
and the shell script:
#!/bin/csh
echo in test script echo "in test script" >> test.out
When I run the macro either from within sac (i.e. SAC> macro
test_macro) or from the shell prompt (i.e. >sac test_macro), I get this
error:
sh: RUN: not found
sh: ENDRUN: not found
and no output to the test.out file. Test commands inserted into the
macro (e.g. read, setbb, plot, etc.) work fine. I'm running SAC
version 00.59.46 on SunOS 5.8

Any ideas?

Thanks,
Josh


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


  • Renate Hartog
    2006-07-07 21:09:18
    Josh,

    I tried the same on our system (also solaris) and it has the same
    problem. What you can do is simply have a line in your sac-macro that
    says:

    sh test_script


    Renate
    PNSN

    On Fri, 7 Jul
    2006, jcalkins<at>geo.arizona.edu wrote:

    Hi,

    I'm trying to get a macro to kick off a shell script using the 'run...
    endrun' commands and not having any luck. Here's the test macro:
    RUN ./test_script
    ENDRUN
    and the shell script:
    #!/bin/csh
    echo in test script echo "in test script" >> test.out
    When I run the macro either from within sac (i.e. SAC> macro test_macro) or
    from the shell prompt (i.e. >sac test_macro), I get this error:
    sh: RUN: not found
    sh: ENDRUN: not found
    and no output to the test.out file. Test commands inserted into the macro
    (e.g. read, setbb, plot, etc.) work fine. I'm running SAC version 00.59.46
    on SunOS 5.8

    Any ideas?

    Thanks,
    Josh


    ----------------------------------------------------------------
    This message was sent using IMP, the Internet Messaging Program.

    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help


Page built 06:12:49 | v.090361a2