Thread: start sac "silently"

Started: 2007-02-23 04:50:28
Last activity: 2017-10-23 15:32:08
Topics: SAC Help
andreas wessel
2007-02-23 04:50:28
Hi list,

I'm wondering if there is an easy way to start SAC silently, e.g. not
getting those lines:

SEISMIC ANALYSIS CODE [06/06/2005 (Version 100.1)]
Copyright 1995 Regents of the University of California

Would be net if there was a flag or command or something for this. (I'm
using Sac 100.1 on a linux machine)

Thanks,
Andreas

  • Robert Casey
    2007-02-22 16:16:26

    Would sac > /dev/null behave properly? Perhaps if you have
    your sac actions scripted, you don't need to see stdout. I don't
    know if there is a dependency on SAC having control of the stdout
    pipe, though.

    -Rob

    On Feb 21, 2007, at 11:50 PM, andreas wessel wrote:

    Hi list,

    I'm wondering if there is an easy way to start SAC silently, e.g.
    not getting those lines:

    SEISMIC ANALYSIS CODE [06/06/2005 (Version 100.1)]
    Copyright 1995 Regents of the University of California

    Would be net if there was a flag or command or something for this.
    (I'm using Sac 100.1 on a linux machine)

    Thanks,
    Andreas

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


    • andreas wessel
      2007-02-23 16:34:10
      Yes, that does the trick, but it throws everything away.

      But I'd like to have some of the output logged. Just not those startup
      lines.


      I blame my suboptimal scripting strategy for the fact that I do some
      operation to 100 files by doing a for loop and then starting sac for each
      file. So in my logfile I have those Sac starting message 100 times.

      Removing it in the source might be worth a shot, but I didn't compile SAC
      myself in the first place as the binaries just worked.

      Thanks,
      Andreas

      On 2/23/07, Robert Casey <rob<at>iris.washington.edu> wrote:


      Would sac > /dev/null behave properly? Perhaps if you have
      your sac actions scripted, you don't need to see stdout. I don't
      know if there is a dependency on SAC having control of the stdout
      pipe, though.

      -Rob



      • Keith Richards-Dinger
        2007-02-23 01:09:51
        How about just piping SAC's stdout through a couple of
        grep commands:

        sac | grep -v "Version 100.1" | grep -v "Copyright" > logfile

        And maybe you want to pipe stderr instead of or in
        addition to stdout.

        -Keith

        On 2/22/07, andreas wessel <awbochum<at>gmail.com> wrote:
        Yes, that does the trick, but it throws everything away.

        But I'd like to have some of the output logged. Just not those startup
        lines.


        I blame my suboptimal scripting strategy for the fact that I do some
        operation to 100 files by doing a for loop and then starting sac for each
        file. So in my logfile I have those Sac starting message 100 times.

        Removing it in the source might be worth a shot, but I didn't compile SAC
        myself in the first place as the binaries just worked.

        Thanks,
        Andreas


        On 2/23/07, Robert Casey <rob<at>iris.washington.edu> wrote:

        Would sac > /dev/null behave properly? Perhaps if you have
        your sac actions scripted, you don't need to see stdout. I don't
        know if there is a dependency on SAC having control of the stdout
        pipe, though.

        -Rob




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



  • Xiaotao Yang
    2017-10-23 15:32:08
    In you bash profile (~/.bash_profile) or csh equivalent, add a line:
    export SAC_DISPLAY_COPYRIGHT=0

    Hope this helps.
    Xiaotao
12:10:15 v.01697673