[Nitro] question for unix wizzards

George Moschovitis george.moschovitis at gmail.com
Tue Feb 5 03:35:42 EST 2008


Thanks for the help   everyone!



On Feb 4, 2008 6:49 PM, Reid Thompson <Reid.Thompson at ateb.com> wrote:

>
> On Mon, 2008-02-04 at 18:09 +0200, George Moschovitis 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?
> from http://www.student.northpark.edu/pemente/sed/sed1line.txt
>
> # delete duplicate, nonconsecutive lines from a file. Beware not to
> # overflow the buffer size of the hold space, or else use GNU sed.
> sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P'
>
> > - a quick and easy way to decide if two image (binary) files are the
> > same image/picture?
> diff will tell you if the files are different also
>
> rthompso at raker ~ $ diff 10000_Galaxies,_HST_Ultra_Deep.png
> Deathvalleysky_nps_big.png
> Files 10000_Galaxies,_HST_Ultra_Deep.png and Deathvalleysky_nps_big.png
> differ
> rthompso at raker ~ $ cp 10000_Galaxies,_HST_Ultra_Deep.png junk.png
> rthompso at raker ~ $ diff 10000_Galaxies,_HST_Ultra_Deep.png junk.png
>
>
> >
> > thanks in advance for your help!
> >
> > -g.
> >
> > --
> > http://gmosx.me.gr
> > http://joy.gr
> > http://cull.gr
> > http://nitroproject.org
> > http://phidz.com
> > http://joyerz.com
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://gmosx.me.gr
http://joy.gr
http://cull.gr
http://nitroproject.org
http://phidz.com
http://joyerz.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20080205/437593ef/attachment.html 


More information about the Nitro-general mailing list