procmail
[Top] [All Lists]

Re: GNU sed version 2.05 is broken?

1997-10-17 12:23:37

Chris Bidmead wrote:

bash-2.00$ sed -g 's/2/too/'
2 2 solid flesh^D

too too solid flesh

Here's GNU sed's variant on the above:

[root(_at_)ls550 bidmead]# sed -g 's/2/too/'
sed: illegal option -- g
Usage: sed [-nV] [--quiet] [--silent] [--version] [-e script]
        [-f script-file] [--expression=script] [--file=script-file] [file...]

...in other words, collapse of stout party.  Doesn't understand -g,  
misinterpets it as -- g and calls it an "illegal option".  Yet the GNU  
man page say it does understand -g (and I should hope it would...).

[How is this related to procmail?]

My man page says nothing about -g:

SYNOPSIS
       sed [ -hnV ] [ -e script ] [ -f script-file ] [ --help ] [
       --quiet ] [ --silent ] [ --version ] [ --expression=script
       ] [ --file=script-file ] [ file ...  ]

This works:

$ sed 's/2/too/g'
2 2 solid flesh
too too solid flesh

-- 
Peter Galbraith, research scientist             
<galbraith(_at_)mixing(_dot_)qc(_dot_)dfo(_dot_)ca>
Maurice-Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada  418-775-0852 - FAX 418-775-0546

<Prev in Thread] Current Thread [Next in Thread>