in reply to Read file line by line and check equal lines

The unix program uniq with the -d parameter does exactly this.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: Read file line by line and check equal lines
by McDarren (Abbot) on Mar 06, 2007 at 12:10 UTC
    Actually, no.
    If you look at the desired output provided by the OP it seems that he wants those lines that appear once, and once only.

    uniq -d prints duplicated lines, so that will not help him (or her). What he wants is uniq -u

    --Darren :)

      Ah, the sweet success of using a tool exactly backwards!

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊