Replace a string @CURRANGE("***","***") to @CURRANGE("xxx","xxx") in a file
Hi all,
I have a file in which I need to find and replace a string @CURRANGE("***","???") to @CURRANGE("---","^^^") where ***, ???, --- and ^^^ can be any string. I feel I need to use sed to do it but if someone could be more specific that would be much more helpful. Thank You. Mayur. |
Hi Mayur and welcome to LinuxQuestions!
Here is an example: Code:
sed 's/@CURRANGE("[^"]*","[^"]*")/@CURRANGE("new_string_one","new_string_two")/g' file Code:
$ cat file |
Hi colucix:cool:,
Brilliant :cool: !! Worked very Smooth !! Thanks so much !!!!! |
You're welcome! :)
|
All times are GMT -5. The time now is 09:37 AM. |