I have an awk script which can be used in the following ways:
xi and xf will only be mandatory when processing the file fin.zc.
awk -v xi=0/-0.5 -v xf=80/30 -f ./zc2cmd.awk fin.zc > fout.cmod
awk -f ./zc2cmd.awk -u
awk -f ./zc2cmd.awk --usg
awk -f ./zc2cmd.awk -e
awk -f ./zc2cmd.awk -examples
awk -f ./zc2cmd.awk -h
awk -f ./zc2cmd.awk -help
I have tried the below, but does not describe all the ways to use it, and might be confusing.
Basically I use
awk [mandatoryArgs] -f ./zc2cmd.awk fin > fout
awk -f ./zc2cmd.awk [optionalArgs]
print " awk [mandatoryArgs] -f ./zc2cmd.awk fin > fout"
print " awk -f ./zc2cmd.awk [optionalArgs]"
print ""
print "--Mandatory Arguments--------------------------------------------------"
print ""
print " -v xi=xix/xiz Top left corner of the model."
print " -v xf=xfx/xfz Bottom right corner of the model."
print " fin Input sound speed profile (.zc) file."
print " fout Output sound speed (.cmd) file."
print ""
print "--Optional Arguments--------------------------------------------------"
print ""
print " -h, --help, -u, --usage, -e, --examples"
print " Prints a usage message."