LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-26-2011, 08:30 AM   #16
somshridhar
LQ Newbie
 
Registered: Sep 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled

Dear Sir,

Thank you for your input.

The point ids can be anything only they should be in series as program contain series changes from x to y. Even 601 to 603 can be given.

I tried the program created by you but it gives output.txt same as input1.txt. It seems the find and replace function is not working and my problem lies there only.

I have trouble with this only. Please suggest.

Thank you
shridhar
 
Old 12-26-2011, 08:46 AM   #17
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by somshridhar View Post
The point ids can be anything only they should be in series as program contain series changes from x to y. Even 601 to 603 can be given.
In post #9, you showed IDs in input.txt 600003, 600004 and 600006, but in input1.txt 6000003, 6000004 and 6000006.

Quote:
I tried the program created by you but it gives output.txt same as input1.txt. It seems the find and replace function is not working and my problem lies there only.
What do your input.txt and input1.txt look like?

I tested the program I showed using
input.txt
Code:
Enter_the_number_of_names
2
Enter_the_name
Enter_the_range_of_points
Shri
600001
600003
Proactive
600004
600006
input1.txt
Code:
$POINT ID = 600001
I went to college
$POINT ID = 600002
I don't go to college.
It is tedious program
$POINT ID = 600003
Shridhar Ram Rahim
$POINT ID = 600004
Very Easy Program
$POINT ID = 600005
Life is nice
$POINT ID = 600006
and the result was output.txt
Code:
$POINT ID = 600001:Shri
I went to college
$POINT ID = 600002:Shri
I don't go to college.
It is tedious program
$POINT ID = 600003:Shri
Shridhar Ram Rahim
$POINT ID = 600004:Proactive
Very Easy Program
$POINT ID = 600005:Proactive
Life is nice
$POINT ID = 600006:Proactive
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Find and Replace linuxtuxian Linux Mint 2 07-22-2011 01:31 PM
[SOLVED] Help with find/replace in vi Mr. Swillis Linux - Software 3 02-08-2010 01:57 PM
Need help to create a basic search and replace function. str1fe Linux - Newbie 4 01-11-2010 01:05 PM
can't find my find command! how to replace? dave247 Debian 4 11-19-2008 10:51 AM
Find and Replace dipuasks Linux - General 4 07-02-2008 01:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration