Please help me.


 
Thread Tools Search this Thread
Top Forums Programming Please help me.
# 1  
Old 07-04-2011
Please help me.

I am new to C programming. I have been trying to display unique lines in a file from past two days. The problem is here,

I have a file whose contents are,

ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
ras.beamtele.net
crawl-66-249-72-97.googlebot.com
27.61.242.247
27.61.242.247
27.61.242.247
27.61.242.247
27.61.242.247
1.23.209.154
27.61.242.247
1.23.209.154
1.23.209.154
1.23.209.154

and i need to display all unique lines. And the output should be,

ras.beamtele.net
crawl-66-249-72-97.googlebot.com
27.61.242.247
1.23.209.154.

Please help me how to do it using C language.
Thanks in advance.

Moderator's Comments:
Mod Comment Also a double post

Last edited by Scott; 07-04-2011 at 04:21 PM.. Reason: Closed
# 2  
Old 07-04-2011
Hello,

Per our forum rules, all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!", "Urgent!!", "Doubt" or anything that does not accurately reflect the nature of your problem. Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

The reason for this is that nearly 95% of all visitors to this site come here because they are referred by a search engine. In order for future searches on your post (with answers) to work well, the subject field must be something useful and related to the problem!

In addition, current forum users who are kind enough to answer questions should be able to understand the essence of your query at first glance.

So, as a benefit and courtesy to current and future knowledge seekers, please be careful with your subject text. You might receive a forum infraction if you don't pay attention to this.

Thank you.

The UNIX and Linux Forums
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question