Computing.Net > Forums > Programming > Find n Replace

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Find n Replace

Reply to Message Icon

Name: amol10
Date: June 24, 2009 at 22:55:47 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hi,

Can any body help me on the following issue,

I have one text file called "final.txt" from this
file I want to remove specific lines like,

CanvasDetails,0,10,20,30 (Some line with
start of Canvasdetails word)
$ (Special symbol)
10 (Starting with integer)

I need a batch file which will generate new file
with this changes on single click.

So is there any command/ Code snippet for
that ?

Can ny one help on this issue...?




Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: June 24, 2009 at 23:39:53 Pacific
Reply:

if you have Gawk on windows (see my sig)

c:\test> gawk "!/^[0-9]/&&!/\$/&&!/CanvasDetails" file.txt

GNU win32 packages | Gawk


0

Response Number 2
Name: amol10
Date: June 24, 2009 at 23:45:04 Pacific
Reply:

Thnx for the suggestion But what if I dnt have this installed on
my sysytem and I want to write the command in Batch file for
this issue ...wht can I do ?


0

Response Number 3
Name: ghostdog
Date: June 25, 2009 at 00:47:17 Pacific
Reply:

then use the findstr command. see findstr /? for more info

GNU win32 packages | Gawk


0

Response Number 4
Name: amol10
Date: June 25, 2009 at 01:59:11 Pacific
Reply:

Ok I have used this command but its seems tht it only finds the
string but wht is the command for replacement of tht string with
some other string?


0

Response Number 5
Name: screwed124816
Date: July 2, 2009 at 18:13:12 Pacific
Reply:

couldnt u just use ctrl+H?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

making own os vb login



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Find n Replace

Find and Replace text in Batch File www.computing.net/answers/programming/find-and-replace-text-in-batch-file/12413.html

Batch find and replace www.computing.net/answers/programming/batch-find-and-replace/15145.html

CMD script find and replace text www.computing.net/answers/programming/cmd-script-find-and-replace-text/15412.html