[nos-bbs] Command & configuratin line comments

Barry Siegfried k2mf at nnj.k2mf.ampr.org
Wed Sep 20 18:46:11 EDT 2006


["Barry Siegfried" <k2mf at nnj.k2mf.ampr.org> wrote]:

> ["(Skip) K8RRA" <k8rra at ameritech.net> wrote]:
>
> > If "#" may be inserted anywhere on any command line to begin a
> > comment, that would be compatible with bash and a good thing.
> > (perhaps only in my opinion...)
>
> This *can* be done but several sections of the code would have to
> be modified in order to make it work right.  You would have to
> make sure that all possibilities (where '#' or ';' characters are
> intended to be parts of quoted arguments) are accounted for and
> not handled incorrectly.  This goes for hidden Net/Rom nodes which
> begin with the '#' character as well.  There are other cases where
> '#' or ';' characters might be significant.  I just can't think of
> any more at the moment.
>
> It's never as easy as it first looks.

But it wasn't *that* difficult.  I thought I'd give it a try in the
NOS which I use and I've decided that I like it because I was able
to eliminate "special" code which looks for comment characters in
commands like:  'route add <destination> <interface> [<next ip gateway>,
direct [<metric>]]' and 'start/stop <server> [<port>]'.

I also eliminated ';' as a generic NOS comment character.  I decided
that it wasn't needed.

And lastly, I found two possibilities where the '#' character in the
first position of a non-whitespace field is significant:  In the
<alias> field for the 'netrom route add <alias> <destination>
<interface> <quality> <neighbor>' command and in the ["#,>"<filename>]
field for the 'trace <interface> [subcommand ...] ["#,>"<filename>]'
command.  I have therefore disabled the automatic comment recognition
for the pertinent argument positions in command lines which contain
these commands.

73, de Barry, K2MF >>
           o
          <|>      Barry Siegfried
+---------/-\---------------------------+
| Internet | bgs at mfnos.net              |
| HomePage | http://www.mfnos.net/~bgs  |
+----------+----------------------------+
| Amprnet  | k2mf at nnj.k2mf.ampr.org     |
| PBBS     | k2mf at k2ge.#cnj.nj.usa.noam |
+----------+----------------------------+




More information about the nos-bbs mailing list