I need to use a sed
command to search a text file and replace $Date$
with: $Date: 2021-01-06... $
where ...
is the text for the date.
I have a sed
command that will search for Date
and replace it with Date: 2021-01-06...
:
sed "s/Date/Date $(date)/"
but I can't get a sed
command to work to replace $Date$
.
Also, I was able to get a sed
command to replace $Date
using sed "s/\$Date/\$Date $(date)/"
but I can't figure out the syntax to search and replace $Date$
.
I tried:
sed "s/\$Date\$/\$Date $(date) \$/"
but it does not work.