We have a process which can use a file containing sed
commands to alter piped input.
I need to replace a placeholder in the input with a variable value,
I am in agreement with sputnick. I don't believe that sed would be able to complete that task.
However, you could generate that file on the fly.
You could change the date to a fixed string, like
__DAYOFWEEK__
.
Create a temp file, use sed to replace __DAYOFWEEK__
with $(date +%Y)
.
Then parse your file with sed -f $TEMPFILE
.
sed is great, but it might be time to use something like perl that can generate the date on the fly.