Thread: Help with version 101.6a

Started: 2015-01-23 19:20:40
Last activity: 2015-01-24 06:50:16
Topics: SAC Help
Mei Xue
2015-01-23 19:20:40
I am wondering if anyone can help me with the following problem:

After I installed the latest version of SAC (101.6 for X86-64) I found that
a piece of my SAC macro codes didn't work and which worked and still works
well in the older version of SAC (101.3b for X86-64). The piece of codes
and their corresponding output the two versions of SAC are as the following:

101.3b version:

setbb log " ( concatennate &1,kstnm& .split ) "
message "%log%"
HY16.split

101.6a version:
setbb log " ( concatennate &1,kstnm& .split ) "
message "%log%"
( concatennate HY16 .split )

Similarly,

101.3b version:
sc echo "l %xc% ( %yc% + 0.01)" >> split.pcf
OUTPUT the following line into split.pcf:
l 0.53125 0.6611112

Whereas for 101.6a version:
sc echo "l %xc% ( %yc% + 0.01)" >> split.pcf
OUTPUT the following error message:
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `echo l 0.53125 ( 0.651111 + 0.01) >> split.pcf '

Thanks.

Mei

Mei Xue
Global Seismology & Geodynamics
State Key Laboratory of Marine Geology
School of Ocean & Earth Science
Tongji University
Siping Rd, Yangpu District, Shanghai, China, 200092

  • Milton Plasencia
    2015-01-23 17:16:01
    Hi Mai,

    if you scape the (,

    write

    sc echo "l %xc% \( %yc% + 0.01 \ ) " >> split.pcf

    HTH,

    M.

    * * * * * * * * * * * * * * * * * * * * * * *
    Milton P. PLASENCIA LINARES

    Centro di Ricerche Sismologiche (CRS)
    OGS - Istituto Nazionale di Oceanografia e di Geofisica Sperimentale

    Borgo Grotta Gigante 42/C
    (34010) Sgonico - Trieste - Italia
    Tel: +39 040 2140 141 (Udine)
    Tel: +39 040 2140 256 (Trieste)
    Cel.: +39 331 6481 935

    E-mail: mplasencia<at>inogs.it

    ASAIN (Antarctic Seismographic Argentinean Italian Network)
    *********************************











    On Jan 23, 2015, at 04:20, Mei Xue <meixue.geo<at>gmail.com> wrote:

    I am wondering if anyone can help me with the following problem:

    After I installed the latest version of SAC (101.6 for X86-64) I found that a piece of my SAC macro codes didn't work and which worked and still works well in the older version of SAC (101.3b for X86-64). The piece of codes and their corresponding output the two versions of SAC are as the following:

    101.3b version:

    setbb log " ( concatennate &1,kstnm& .split ) "
    message "%log%"
    HY16.split

    101.6a version:
    setbb log " ( concatennate &1,kstnm& .split ) "
    message "%log%"
    ( concatennate HY16 .split )

    Similarly,

    101.3b version:
    sc echo "l %xc% ( %yc% + 0.01)" >> split.pcf
    OUTPUT the following line into split.pcf:
    l 0.53125 0.6611112

    Whereas for 101.6a version:
    sc echo "l %xc% ( %yc% + 0.01)" >> split.pcf
    OUTPUT the following error message:
    sh: -c: line 0: syntax error near unexpected token `('
    sh: -c: line 0: `echo l 0.53125 ( 0.651111 + 0.01) >> split.pcf '

    Thanks.

    Mei

    Mei Xue
    Global Seismology & Geodynamics
    State Key Laboratory of Marine Geology
    School of Ocean & Earth Science
    Tongji University
    Siping Rd, Yangpu District, Shanghai, China, 200092


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


    • Mei Xue
      2015-01-24 06:50:16
      Dear Milton,

      Thank you very much for your time!

      I tried your way and it didn't produce the expected results. Though SAC
      recognizes the sign of parenthesis now, it doesn't calculate or perform the
      function I want it does, such as add two numbers or concatennate two
      strings. While older version of SAC can do these jobs.

      Mei



      2015-01-23 16:16 GMT+08:00 Milton Plasencia <mplasencia<at>inogs.it>:

      Hi Mai,

      if you scape the (,

      write

      sc echo "l %xc% \( %yc% + 0.01 \ ) " >> split.pcf

      HTH,

      M.

      * * * * * * * * * * * * * * * * * * * * * * *
      Milton P. PLASENCIA LINARES

      Centro di Ricerche Sismologiche (CRS)
      OGS - Istituto Nazionale di Oceanografia e di Geofisica Sperimentale

      Borgo Grotta Gigante 42/C
      (34010) Sgonico - Trieste - Italia
      Tel: +39 040 2140 141 (Udine)
      Tel: +39 040 2140 256 (Trieste)
      Cel.: +39 331 6481 935

      E-mail: mplasencia<at>inogs.it

      ASAIN (Antarctic Seismographic Argentinean Italian Network)
      *********************************











      On Jan 23, 2015, at 04:20, Mei Xue <meixue.geo<at>gmail.com> wrote:

      I am wondering if anyone can help me with the following problem:

      After I installed the latest version of SAC (101.6 for X86-64) I found
      that a piece of my SAC macro codes didn't work and which worked and still
      works well in the older version of SAC (101.3b for X86-64). The piece of
      codes and their corresponding output the two versions of SAC are as the
      following:

      101.3b version:

      setbb log " ( concatennate &1,kstnm& .split ) "
      message "%log%"
      HY16.split

      101.6a version:
      setbb log " ( concatennate &1,kstnm& .split ) "
      message "%log%"
      ( concatennate HY16 .split )

      Similarly,

      101.3b version:
      sc echo "l %xc% ( %yc% + 0.01)" >> split.pcf
      OUTPUT the following line into split.pcf:
      l 0.53125 0.6611112

      Whereas for 101.6a version:
      sc echo "l %xc% ( %yc% + 0.01)" >> split.pcf
      OUTPUT the following error message:
      sh: -c: line 0: syntax error near unexpected token `('
      sh: -c: line 0: `echo l 0.53125 ( 0.651111 + 0.01) >> split.pcf '

      Thanks.

      Mei

      Mei Xue
      Global Seismology & Geodynamics
      State Key Laboratory of Marine Geology
      School of Ocean & Earth Science
      Tongji University
      Siping Rd, Yangpu District, Shanghai, China, 200092


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




Page built 05:36:23 | v.b'59d0d2