bash script: find, grep if and else programing..
Hi,
I am bussy with a litle bash script but i have now a problem. I have a file on the server with every time different text. Somewere in this text the is the following line: PHP Code:
"0 Matching Service Entries Displayed" To a other text like: "There a no knowing problem(s) on this moment."] If there is a other number than "0" than replace this line with: 2 problems have been found on this moment, whe are bussy to fix this problem, please be paitient. Hope that somewone can help me.. |
If you use grep -l to match the files that contain the text you want, then use the filename that grep gives you and replace the text in the file.
Your text is not quite correct English, you should say: "There are no known problems at this moment." and: "2 problems have been found, we are busy fixing this problem, please be patient" |
I think you're looking for something like this...
Code:
#!/bin/bash Hope this helps :) |
Assuming 'itemTotalsTitle' is a unique item, here is a variation:
Code:
#!bin/bash |
All times are GMT -5. The time now is 12:54 AM. |