[NTLUG:Discuss] Why would a command stop working?
Steve Baker
sjbaker1 at airmail.net
Sun Dec 30 18:19:10 CST 2001
Rick Matthews wrote:
> I've heard that there are no stupid questions, but I'm pretty sure this
> one would win an honorable mention...
>
> I have a script that has been running a couple of times a week for the
> past 6 months or so, without problems. Today I noticed a problem with
> the output and started back-tracking.
>
> There's a line in the script similar to this:
>
> cat file1 | sort | uniq > file2
>
> The problem is that the duplicates are no longer being removed by uniq.
> I created test files and tried it from the command line (as root) and
> still had duplicates in file2.
>
> I know I must be missing something simple... what is it?
Have you checked sort *and* uniq - it's possible that sort stopped
sorting *or* that uniq stopped uniq'ing...the symptoms would be similar
but it would help to be clear about which of them failed.
I don't see any reason why one or other program would stop doing their
jobs (both are pretty simple programs) - but one thing to check would be:
* Run 'which sort' and 'which uniq' to verify that you havn't somehow
accidentally put a program with the same name somewhere else in the
search path.
> File1 has grown to about 3.5 meg. It is a text file with one domain per
> line. I'm running Red Hat 7.1 on a P200 with 128 MB RAM.
But was your test file that large? Try it with a *really* simple test
file - ten lines say.
----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1 at airmail.net> WorkMail: <sjbaker at link.com>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
http://prettypoly.sf.net http://freeglut.sf.net
http://toobular.sf.net http://lodestone.sf.net
More information about the Discuss
mailing list