[NTLUG:Discuss] Why would a command stop working?
Val W. Harris
vwharris at airmail.net
Sun Dec 30 20:46:50 CST 2001
Rick Matthews wrote:
>
>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.
>
Rick,
What's changed since the last "known good run"?
Did the processes generating the lines in file1 change?
If so, perhaps there's a stray blank at the end of a line.
Did the O/S, or sort and uniq get upgraded?
Maybe the behavior of the utilities changed with the new version.
Maybe an option to sort or uniq has changed. What options
are sort and uniq being called with?
Are you sorting entire lines or just one field of the line?
If you're sorting on one field, did the field seperator change?
Is there some reason your script doesn't just do?:
sort -u file1 > file2
If you could be more specific about the script ( without violating
security ), maybe we could be of further assistance.
Val
--
Val W. Harris vwharris at airmail.net
Learn from the mistakes of others. You won't
live long enough to make them all yourself.
More information about the Discuss
mailing list