0

I have some c++ code and i am implementing automization. The code looks like :

startTime  0
endTime    10

I want to replace endTime 10 with endTime $startTime+10

I am following this approach, (it is the second occurrence that's why 1,)

sed -i "1,/endTime/ s/endTime.*/endTime       $startTime+10;/g" $file_path

expexted output:

startTime    0
endTime      $startTime+10

Thanks.

Darshan
  • 71
  • 11

0 Answers0