Hello,
I have the following short piece of SAC code embedded in a shell script, in
which I use variables declared in the shell script to write SAC parameters
(e.g. sac file name, latitude, longitude). The issue is that, while the
script runs as expected, the header variables don't get written. I also
made an attempt of running this part as a macro by echo'ing these lines and
generating a macro but the result was exactly the same. Can I not use shell
variables with CHNHDR function? I am using SAC Version 101.6 on Mac OS X
10.8.
SAC <<EOF
READTABLE FREE CONTENT XY tmp1.txt
WRITE $sacfile_name
READ $sacfile_name
CHNHDR EVLA $eqlat EVLO $eqlon
WRITE HEADER
QUIT
EOF
Many thanks !
Januka.
--
Januka Attanayake
Postdoctoral Research Associate
Laboratório de Sismologia
Complexo Interdisciplinar
Departamento de Física
Instituto Superior Técnico
Av. Rovisco Pais, 1
1049-001 Lisboa, Portugal
Honorary Research Associate
University College London
University email: januka.attanayake<at>ist.utl.pt
Homepage:
http://sites.google.com/site/janukaattanayake/