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

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

undeniable bug in /usr/bin/spell


From: Dan Jacobson
Subject: undeniable bug in /usr/bin/spell
Date: 22 Nov 2001 05:29:27 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Gentlemen, consider what happened when I did
(dired-do-shell-command "spell" nil (quote ("romanization.htm")))
It produced no output, which, if I recall the way things worked back
in the old days,

$ spell file

and one got no output, it meant there were no errors.
Well, I happen to know there are errors in my file, but I am fooled
that there are no errors.  Let's play the blame game.

$ 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.  And does the exec being on the last line help
[just curious].

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"...

$ man spell
No manual entry for spell

well, ok, I suppose if I told them to fold up their vdir man page, I
guess I shouldn't complain about not having a spell man page... But:
why don't you link it to the ispell man page and there and put a
"spell" usage along with the several "ispell" usages listed in the
SYNOPSIS section.

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
no?
Indeed, if I remember the original UNIX spell output, I think you need
cat ${1+"$@"}|ispell -l|sort -u
to emulate it best.

One could go whole hog with
cat ${1+"$@"}|ispell -l|sort|uniq -c
but that wouldn't be an emulation of original spell

Anyways, if I hadn't been in emacs, I would have seen that just as
this says
$ man ispell
SYNOPSIS
       ispell [common-flags] -l

your argument is ignored and it is trying to read standard input,
being in emacs caused the bug to cause even more damage: fooling me
that my file was perfectly spelled without a hint of malfunction.
-- 
http://www.geocities.com/jidanni/ Tel+886-4-25854780



reply via email to

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