variations of sed on True 64 Unix

From: Sherman Owens <owens_at_pet.wustl.edu>
Date: Fri, 13 Oct 2000 10:17:17 -0500

Dear managers:

I have received a couple of shell scripts that came from a System V
Unix system and am having problems fixing a sed command with our
Tru 64 Unix 4.0g systems.

We have a text file that has the date stored as

20001006

We need to run a nightly script that changes the date to today's date.

#4 lines of code
d=`date +"%EY%m%d"`
echo $d
sed 's/200...../\`echo $d\`/' q2nm.txt > new.txt
mv new.txt q2nm.txt

I've tried "-e" flags, escaping etc. and it doesn't work. I've looked
off the sed tutorial, etc. and it doesn't work with our version. Am
I doing something wrong. I could rewrite the scripts but there are
other instances of this throughout. We should be able to use a shell
variable to do substitution.

Thanks!!

Sherman Owens
sherman_at_pet.wustl.edu
Received on Fri Oct 13 2000 - 15:11:53 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT