problem with longoptions

David Relson relson at osagesoftware.com
Mon Mar 28 01:20:34 CEST 2005


On Sun, 27 Mar 2005 13:26:26 -0800
.rp wrote:

> On 15 Mar 2005 at 23:43, David Relson wrote:
> 
> > ######## Test Script #######
> > 
> > #!/bin/sh
> > 
> > cat >0315.cf <<EOF
> > block_on_subnets  = No
> > charset_default   = us-ascii
> > replace_nonascii_characters = No
> > no-header-tags    = Yes
> > stats_in_header   = Yes
> > report-unsure     = No
> > thresh_update     = 0.000000
> > timestamp         = Yes
> > timestamp-date    = 20040822
> > EOF
> > 
> 
> put this in the category of 'just wondering' , but is there a grammer rule as 
> to when to use "-" and when to use "_" ?
> 
> ps:it seems to me that it is much safer to use "_" to avoid any possibility 
> that the compilier will think you are doing math on variables.

Actually, there is a rule (though the above test script doesn't follow it):

In the config file, use underscores.  
On the command line use hyphens.

The two facilities (config file options and command line options)
evolved in parallel and the difference in convention wasn't noticed
until longoptions started being used.

HTH,

David


_______________________________________________
Bogofilter-dev mailing list
Bogofilter-dev at bogofilter.org
http://www.bogofilter.org/mailman/listinfo/bogofilter-dev



More information about the bogofilter-dev mailing list