From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97144972324098.tru64-unix-managers.marc@archive.invalid> From: Sherman Owens Date: Fri, 13 Oct 2000 15:17:17 +0000 To: tru64-unix-managers Subject: variations of sed on True 64 Unix X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97144972324098 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@pet.wustl.edu