Find and replace string ina file with specific condition
All,
I am trying to do this 1. Find line of a text file by grepping specific string 2. Once found, replace one of the string in that line with other. Am using below script, Quote:
|
grep is not necessary or useful there. Read up more on plain sed which can do conditionals like this:
Code:
#!/bin/bash |
Sorry to say, but neither solution presented will change the original file (I think Turbocapitalist might have forgotten the file name ;) ).
Have a look at man sed for the -i option :) |
WOW!!! Awesome. Thanks guys.
|
Quote:
|
All times are GMT -5. The time now is 08:22 PM. |