Help to replace a pattern with sed or awk
Hello,
I am trying to find the best way to replace a pattern in the below line:
Original Line:
./begintraffic -i eth0 -R radius -c 1000 -w testreport.data -m live -I all
After search & replacement it should look like
./begintraffic -i eth0 -R radius -c 1000 -w /home/test/run/testreport.data -m live -I all
Please note:
1) there may be more than one whitespace character after "-w" and the option can be anywhere in the line.
I am trying with awk, but I am unable to find the right expression to match the pattern.Can anyone please help to get the right pattern matching expression with either sed or awk to achieve this?
/Ramesh
|