Results 1 to 10 of 10
-
19th Nov 2011, 02:56 PM #1OPMemberWebsite's:
FunLinkz.com Smyu.inHelp in replacing lines in various files
Guys I have to do a particular work.
I don't know how to go about it. Kindly help!
The work is that-
Suppose I have 100 (.php) files, all files containing a line like-
File one- Revision Version- R001
File two- Revision Version- R002
and so on.
I want to replace the whole line in all files with-
Revision 2.1
That is Revision Version- XXXX to Revision 2.1 in all files.
I am using Notepad++
I think there is a option to do that with N++
If anyone knows then please share.
Or if there is any other way let me know..
ThankyouFunny Reviewed by Funny on . Help in replacing lines in various files Guys I have to do a particular work. I don't know how to go about it. Kindly help! :) The work is that- Suppose I have 100 (.php) files, all files containing a line like- File one- Revision Version- R001 File two- Revision Version- R002 and so on. I want to replace the whole line in all files with- Rating: 5
-
19th Nov 2011, 04:15 PM #2Member
you can do this easily using sed on a linux environment
just need to write a bash script to find and replace these lines
-
19th Nov 2011, 04:21 PM #3Respected MemberWebsite's:
DL4Everything.com Soft2050.inYou can try the tool here:
OR
In Notepad++
Press Ctrl + F -- > Find In Files
-
19th Nov 2011, 05:42 PM #4OPMemberWebsite's:
FunLinkz.com Smyu.in@master- Im on windows env.
@soft-
But how can I replace the changing digits?
Normal replace is easy. But as i told already,
File one has- Text 001
File two has- Text 002
File 3 has- Text 003
And so on...
I want to replace the word Text and the changing digits XXX in every file.
How do I do that?
-
19th Nov 2011, 05:45 PM #5Respected MemberWebsite's:
DL4Everything.com Soft2050.inSet the search mode to regex (Regular Expressions)
It will replace Text 001, Text 002, Text 003 with specified text
-
19th Nov 2011, 06:13 PM #6Respected Member
Ok if they are all on a single line ending in the R001-XXXX
then change the find string to :
Version- (.*)
Version- 2.1
Then click the regular expression radio button at the bottom.
PS Always do a find file alone before adding the replacement text
-
19th Nov 2011, 06:19 PM #7OPMemberWebsite's:
FunLinkz.com Smyu.inThanks a lot Soft. That worked. Damn I should learn more about teh expressions
-
19th Nov 2011, 06:25 PM #8OPMemberWebsite's:
FunLinkz.com Smyu.in@ Lock down-
I figured it out.
Thanks anyways
-
19th Nov 2011, 06:25 PM #9
-
19th Nov 2011, 08:16 PM #10Respected Member
You are all welcome.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Difference between these two lines of code for Wordpress
By LuDo8 in forum Web Development AreaReplies: 2Last Post: 22nd Jul 2012, 10:58 AM -
[VPS] XRumer VPS Servers - 1000 MBPS Lines
By XRumerGeek in forum ArchiveReplies: 3Last Post: 13th May 2012, 12:14 PM -
Some Amazing English Lines
By anaksr in forum General DiscussionReplies: 3Last Post: 27th Jan 2012, 11:26 AM -
Php replacing characters !
By softleaks in forum Web Development AreaReplies: 8Last Post: 30th May 2011, 02:42 PM -
Help , Some malware lines automatically adding to my scripts
By rajeshjsl in forum Webmaster DiscussionReplies: 10Last Post: 7th Feb 2010, 12:01 PM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...