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.