[Nitro] question for unix wizzards

Eivind Eklund eeklund at gmail.com
Mon Feb 4 11:31:35 EST 2008

On Feb 4, 2008 5:09 PM, George Moschovitis <george.moschovitis at gmail.com> wrote:
> Dear devs,
> 2 small unix related questions.
> does anyone know about:
> - a quick and easy way to remove duplicate lines from a text files?

uniq < filename (assuming that the lines are consequtive; otherwise,
you need to do a sort first, or keep the lines in a hash in either
Ruby or Perl)

> - a quick and easy way to decide if two image (binary) files are the same
> image/picture?

Do you mean if they are identical?  cmp should do it.  Another
approach is to get a checksum of the files (e.g. using "openssl rmd160
<filename>") and see if the checksum is the same.


More information about the Nitro-general mailing list