Thread: writing blackboard and header values to ascii

Started: 2008-02-01 21:45:06
Last activity: 2008-02-01 22:28:40
Topics: SAC Help
Dylan Mikesell
2008-02-01 21:45:06
Hi All,

Is there any way to write a blackboard variable and/or a particular
header value (such as user0) to an ascii text file from within SAC?
I can't find anything close to this other than writebbf. I also want
header values so I need something else.
Thanks,

Dylan








  • Kris Walker
    2008-02-01 22:28:40
    Hi Dylan,

    It's been awhile since I used SAC, but a workaround for the header
    values is to write to an ascii file using "write alpha test.txt",
    then execute a unix command to grab from that new file header the
    values you want and redirect them to another ascii file like this "sc
    sed -n 2p test.txt | awk '{print $3}' > valued_data.txt && rm -rf
    test.txt". A kludge, but this approach will work. One thing about
    this though, you have to figure out how to escape SAC interpretation
    of certain characters. I forget the escape sequence(s) required to
    make that command work from within SAC. You could also however write
    a shell script that essentially is this line, then call that shell
    script with the sc command from within SAC instead, after the alpha
    write. Good luck.

    kris

    On Feb 1, 2008, at 12:45 PM, Dylan Mikesell wrote:

    Hi All,

    Is there any way to write a blackboard variable and/or a particular
    header value (such as user0) to an ascii text file from within SAC?
    I can't find anything close to this other than writebbf. I also
    want header values so I need something else.
    Thanks,

    Dylan







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


18:07:08 v.22510d55