[teqc] helpful tip of week 1900

Lou Estey lou at unavco.org
Wed Jun 8 07:13:25 MDT 2016

This week's tip:  Why does `teqc +help` show some option names with square brackets?

This week's tip is pretty simple and straightforward, but it has tripped up or confused
some teqc users from time to time.

When you execute `teqc +help` you will see almost all teqc options.  Let's take a
quick look at the beginning of the output from this teqc command:

[1449] teqc +help
Usage: teqc [opts] file1 [file2 [...]]
       or: teqc [opts] < stdin
where [opts]:
            -ver[sion] or +ver[sion]  write program version and build to stderr
            -id or +id           write program id to stderr
            -help or +help       output the entire on-line help to stderr

The standard ASCII syntax for UNIX/Linux command manual pages showing usage is
to put optional parts of the command in square brackets, i.e. '[...]'.  For the
two usage lines above for teqc you immediately see that `teqc file1` will
try to do something since using any options at all is ... optional!  (The default
behaviour of teqc with no options is to read the input file, determine what it
is (i.e. auto-identify the file), and then, if possible, output a RINEX file, where
the output RINEX file will be a RINEX observation file unless the input is a RINEX
navigation or meteorological file, in which case a RINEX navigation or meteorological
file, respectively, is what is output.)

You also see in `teqc +help` that some options themselves have square brackets, e.g.
to get the version (and build) of the teqc executable that you are using, `teqc +help`
says to use '-ver[sion]' or '+ver[sion]'.  But the '[sion]' part of the option
name is optional.  You can use just '-ver' or '+ver' to do the same thing.  In fact,
as long as you do not include any whitespace, you can have any ASCII characters (that are
not shell metacharacters) that you want after the 'ver' (including more square brackets,
if you really want them for your own use):

teqc +ver_and_this_part_is_just_[a_whole_lot_of_extra_characters]

will do exactly the same thing as:

teqc +ver
teqc +version
teqc +ver[sion]

So you only need to include the option name up to, but not including, the left '[' bracket.
(But include the entire option name from `teqc +help` if there are no square brackets.)
Basically, the extra part of options in `teqc +help` that are in square brackets
are just for human readability.  A very good example of this are the options -O.px and -O.pg
(and +O.px and +O.pg, which do a little more if used during qc modes):

-O.px[WGS84xyz,m] x y z  set RINEX OBS header antenna WGS 84 position to x y z (meters)
+O.px[WGS84xyz,m] x y z  same as -O.px[WGS84xyz,m], but also fixes antenna position for qc
-O.pg[eo,ddm] lat lon el set RINEX OBS header antenna WGS 84 position to lat lon elevation (deg deg meters)
+O.pg[eo,ddm] lat lon el same as -O.pg[eo,ddm], but also fixes antenna position for qc

i.e. the stuff in the square brackets is a little reminder that -O.px is for WGS84 cartesian
XYZ in units of meters and that -O.pg is the geodetic equivalent (in latitude, longitude, and
height) in units of degrees, degrees, and meters.

If you scan through `teqc +help`, you should easily get the idea.

Happy teqc-ing!


Louis H. Estey, Ph.D.              office:  [+001] 303-381-7456
UNAVCO, 6350 Nautilus Drive           FAX:  [+001] 303-381-7451
Boulder, CO  80301-5554            e-mail:  lou  unavco.org
            WWW:  http://www.unavco.org   http://jules.unavco.org

"If the universe is the answer, what is the question?"
                                                  -- Leon Lederman

Past helpful tips:

week 1894: using teqc config files - http://postal.unavco.org/pipermail/teqc/2016/002067.html
week 1895: qc of high-rate data - http://postal.unavco.org/pipermail/teqc/2016/002071.html
week 1896: UNIX/Linux shells for Windows - http://postal.unavco.org/pipermail/teqc/2016/002072.html
week 1897: '-' vs. '+' teqc options - http://postal.unavco.org/pipermail/teqc/2016/002076.html
week 1898: auto-identification of formats - http://postal.unavco.org/pipermail/teqc/2016/002092.html
week 1899: auto-identification vs. format flags - http://postal.unavco.org/pipermail/teqc/2016/002096.html

More information about the teqc mailing list