Hi,
I want to parse and modify a file.
input file:
Code:
$ cat input_file
date : 01/01/2011
output file which I expect:
Code:
$ cat output_file
date : 04/09/2012
A variable NEW_DATE already has a value 04/09/2012.
Code:
NEW_DATE=04/09/2012
I tried the following command.
Code:
$ sed "s/Date :.\+/Date : $NEW_DATE/" input_file > output_file
But,
because the variable NEW_DATE includes '/' characters,
a problem occurs with the above command.
Can this problem be solved?
I cannot modify the value of the variable NEW_DATE.
Thank you.