0

I am trying to replace the pattern of the file from below command inside the shell script -

 "sed -i 's/start.datetime.*/start.datetime=$param_date 00:00:00/g'" conf.txt

But it gives below error -

./Test.sh: line 22: sed -i 's/start.datetime.*/start.datetime=2021-01-11 00:00:00/g': No such file or directory

However the very next line which is below gives required output -

echo `grep start.datetime conf.txt`
start.datetime=2020-12-01 00:00:00

I am not able to figure out why the sed not able to locate the file and replace the pattern.

RAHUL SONI
  • 59
  • 1
  • 7

0 Answers0