Find certain string in .php file and replace [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite












So I’m pretty new to using Linux etc, and I was wondering if there’s any possibility someone could tell me how I can write the following ( I will be pretty clear, so you won’t have to type like “file1” or sth like that ):



So I want to be able to run a program that just searches for the string in my php file, and replaces it with the string I type. ( the string that needs to be replaced is everytime on the same place in the php file and is everytime something different )
I have multiple php files where this needs to happen, but every different php file needs the same string replaced by the thing I type.
All this just makes it 10 times easier for me, because otherwise I need to open every php file one by one and change that certain string.



If you need any more info about it. Or if I wasn’t clear for certain things, let me know!



Thanks for reading /( maybe answering?) this







share|improve this question











put on hold as unclear what you're asking by Jeff Schaller, G-Man, SivaPrasath, schily, Jesse_b 11 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    adding few sample files(2-5 lines each) and expected output will go a long way in improving the question.. you mention everytime something is different, how to do you expect an answer if we do not know the nature of it? are you replacing entire line? particular word that occurs after something fixed? and so on.. that said, unix.stackexchange.com/questions/112023/… should get you started with sed and perhaps even answer your question fully
    – Sundeep
    yesterday










  • There’s a certain line in my php file that says: $spend_x = “I_Want_ToReplace_This” , and I want to replace that with something I type in a txt file, so everytime I type something in the Txt file, it automatically changes in every php file
    – Edouard Goddeeris
    yesterday







  • 1




    @EdouardGoddeeris Add that information to your question with parts of the file for and example and the expected output. You're more likely to get the help you need that way.
    – Nasir Riley
    yesterday
















up vote
0
down vote

favorite












So I’m pretty new to using Linux etc, and I was wondering if there’s any possibility someone could tell me how I can write the following ( I will be pretty clear, so you won’t have to type like “file1” or sth like that ):



So I want to be able to run a program that just searches for the string in my php file, and replaces it with the string I type. ( the string that needs to be replaced is everytime on the same place in the php file and is everytime something different )
I have multiple php files where this needs to happen, but every different php file needs the same string replaced by the thing I type.
All this just makes it 10 times easier for me, because otherwise I need to open every php file one by one and change that certain string.



If you need any more info about it. Or if I wasn’t clear for certain things, let me know!



Thanks for reading /( maybe answering?) this







share|improve this question











put on hold as unclear what you're asking by Jeff Schaller, G-Man, SivaPrasath, schily, Jesse_b 11 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    adding few sample files(2-5 lines each) and expected output will go a long way in improving the question.. you mention everytime something is different, how to do you expect an answer if we do not know the nature of it? are you replacing entire line? particular word that occurs after something fixed? and so on.. that said, unix.stackexchange.com/questions/112023/… should get you started with sed and perhaps even answer your question fully
    – Sundeep
    yesterday










  • There’s a certain line in my php file that says: $spend_x = “I_Want_ToReplace_This” , and I want to replace that with something I type in a txt file, so everytime I type something in the Txt file, it automatically changes in every php file
    – Edouard Goddeeris
    yesterday







  • 1




    @EdouardGoddeeris Add that information to your question with parts of the file for and example and the expected output. You're more likely to get the help you need that way.
    – Nasir Riley
    yesterday












up vote
0
down vote

favorite









up vote
0
down vote

favorite











So I’m pretty new to using Linux etc, and I was wondering if there’s any possibility someone could tell me how I can write the following ( I will be pretty clear, so you won’t have to type like “file1” or sth like that ):



So I want to be able to run a program that just searches for the string in my php file, and replaces it with the string I type. ( the string that needs to be replaced is everytime on the same place in the php file and is everytime something different )
I have multiple php files where this needs to happen, but every different php file needs the same string replaced by the thing I type.
All this just makes it 10 times easier for me, because otherwise I need to open every php file one by one and change that certain string.



If you need any more info about it. Or if I wasn’t clear for certain things, let me know!



Thanks for reading /( maybe answering?) this







share|improve this question











So I’m pretty new to using Linux etc, and I was wondering if there’s any possibility someone could tell me how I can write the following ( I will be pretty clear, so you won’t have to type like “file1” or sth like that ):



So I want to be able to run a program that just searches for the string in my php file, and replaces it with the string I type. ( the string that needs to be replaced is everytime on the same place in the php file and is everytime something different )
I have multiple php files where this needs to happen, but every different php file needs the same string replaced by the thing I type.
All this just makes it 10 times easier for me, because otherwise I need to open every php file one by one and change that certain string.



If you need any more info about it. Or if I wasn’t clear for certain things, let me know!



Thanks for reading /( maybe answering?) this









share|improve this question










share|improve this question




share|improve this question









asked yesterday









Edouard Goddeeris

1




1




put on hold as unclear what you're asking by Jeff Schaller, G-Man, SivaPrasath, schily, Jesse_b 11 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as unclear what you're asking by Jeff Schaller, G-Man, SivaPrasath, schily, Jesse_b 11 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 1




    adding few sample files(2-5 lines each) and expected output will go a long way in improving the question.. you mention everytime something is different, how to do you expect an answer if we do not know the nature of it? are you replacing entire line? particular word that occurs after something fixed? and so on.. that said, unix.stackexchange.com/questions/112023/… should get you started with sed and perhaps even answer your question fully
    – Sundeep
    yesterday










  • There’s a certain line in my php file that says: $spend_x = “I_Want_ToReplace_This” , and I want to replace that with something I type in a txt file, so everytime I type something in the Txt file, it automatically changes in every php file
    – Edouard Goddeeris
    yesterday







  • 1




    @EdouardGoddeeris Add that information to your question with parts of the file for and example and the expected output. You're more likely to get the help you need that way.
    – Nasir Riley
    yesterday












  • 1




    adding few sample files(2-5 lines each) and expected output will go a long way in improving the question.. you mention everytime something is different, how to do you expect an answer if we do not know the nature of it? are you replacing entire line? particular word that occurs after something fixed? and so on.. that said, unix.stackexchange.com/questions/112023/… should get you started with sed and perhaps even answer your question fully
    – Sundeep
    yesterday










  • There’s a certain line in my php file that says: $spend_x = “I_Want_ToReplace_This” , and I want to replace that with something I type in a txt file, so everytime I type something in the Txt file, it automatically changes in every php file
    – Edouard Goddeeris
    yesterday







  • 1




    @EdouardGoddeeris Add that information to your question with parts of the file for and example and the expected output. You're more likely to get the help you need that way.
    – Nasir Riley
    yesterday







1




1




adding few sample files(2-5 lines each) and expected output will go a long way in improving the question.. you mention everytime something is different, how to do you expect an answer if we do not know the nature of it? are you replacing entire line? particular word that occurs after something fixed? and so on.. that said, unix.stackexchange.com/questions/112023/… should get you started with sed and perhaps even answer your question fully
– Sundeep
yesterday




adding few sample files(2-5 lines each) and expected output will go a long way in improving the question.. you mention everytime something is different, how to do you expect an answer if we do not know the nature of it? are you replacing entire line? particular word that occurs after something fixed? and so on.. that said, unix.stackexchange.com/questions/112023/… should get you started with sed and perhaps even answer your question fully
– Sundeep
yesterday












There’s a certain line in my php file that says: $spend_x = “I_Want_ToReplace_This” , and I want to replace that with something I type in a txt file, so everytime I type something in the Txt file, it automatically changes in every php file
– Edouard Goddeeris
yesterday





There’s a certain line in my php file that says: $spend_x = “I_Want_ToReplace_This” , and I want to replace that with something I type in a txt file, so everytime I type something in the Txt file, it automatically changes in every php file
– Edouard Goddeeris
yesterday





1




1




@EdouardGoddeeris Add that information to your question with parts of the file for and example and the expected output. You're more likely to get the help you need that way.
– Nasir Riley
yesterday




@EdouardGoddeeris Add that information to your question with parts of the file for and example and the expected output. You're more likely to get the help you need that way.
– Nasir Riley
yesterday















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)