What's the best way to edit a file with a bash script?
your_date='your desired date'
sed -i "s/^Current date.*/Current date ${your_date}/" /path/to/file
That's the easiest way. This assumes that all lines that contains a date to replace also are the only lines to start with 'Current date'.
Note that the user level that runs this command must also have permission to edit that file.
-i means inline edit, which means you are editing the file directly.
^Current date.*
Means all lines starting with: Current date and ending in anything. In other words, replace the entire line with what is in the second /.../ part of the sed thing.
Double " are used around the sed statement so that variables will be used as variables, not strings.