bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: undeniable bug in /usr/bin/spell


From: Paul Jarc
Subject: Re: undeniable bug in /usr/bin/spell
Date: Wed, 21 Nov 2001 17:24:26 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 (i386-redhat-linux-gnu)

Dan Jacobson <address@hidden> wrote:
> $ which spell|xargs cat
> #!/bin/sh
>
> # ispell -l mimicks the standard unix spell program, roughly.
>
> exec ispell -l $*
> -----------
> they really ought to say who wrote this.  Also, don't the pros use
> ${1+"$@"} or something.

I agree this should be changed.  $* resplits the arguments according
to whitespace (or $IFS), which is not what we want here.

> And does the exec being on the last line help [just curious].

We do want to exec, because there's no need for the shell to hang
around sitting on memory.  Some shells automatically exec for the last
command, if it's an external.  Others don't.  So it should be spelled
out here.

> Anyway, who put that spell program on my system?
>
> $ which spell|xargs rpm -qif
> Group       : Text tools                    Source RPM: 
> ispell-3.1.20-13mdk.src.rpm
> Ispell is the GNU interactive spelling checker.
>
> Ah, "GNU"...

No, you put it there.  You seem to have gotten it from Mandrake.
Mandrake may or may not have gotten it from GNU.  Grab the GNU source,
install it somewhere, and see if there's a "spell" script.  If not,
then it was added by Mandrake, so you should be complaining to them.
This is a good procedure to follow for future reports as well.  If you
don't want to go through all that, start with Mandrake.  They're
responsible for their own package.  If they didn't introduce the
problem, then they ought to report it to the GNU maintainers, or
inform you so you can.

> By the very important way,
>        The -l or "list" option to ispell is  used  to  produce  a
>        list of misspelled words from the standard input.
> Therefore the shell script fellow should do
> cat ${1+"$@"}|ispell -l

Either that, or the documentation is incorrect.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]