LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Comparing Line Per Line In Shell Programming (https://www.linuxquestions.org/questions/programming-9/comparing-line-per-line-in-shell-programming-520738/)

mblames 01-18-2007 10:25 PM

Comparing Line Per Line In Shell Programming
 
Hi all,
Can someone help me with shell programming, I want to compare line per line from file. The file contains :

1234
1234
1234
3123
3123
1232
2323

And it will compare line per line, so every line will be non-identical.
so it will be like this :

1234
3123
1232
2323

Thanks b4



Regards

osdeals 01-18-2007 10:29 PM

Not very sure i understood your requirement. Seems you're looking for the 'uniq' command, which will find all unique items (lines) in the file.

In case the requirement is different, please elaborate.

mblames 01-18-2007 10:57 PM

Im requiring a script that reads and compare line per line.
And the write the output to another file, just like filtering.
So the output file will have the non-identical 'string'.

'uniq' eh ?
I'try it, thank u


Regards

mblames 01-18-2007 11:37 PM

Well its working :D
Thanks a lot friend


Regards


All times are GMT -5. The time now is 10:36 AM.