tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Sherman Owens <owens () pet ! wustl ! edu>
To: tru64-unix-managers
Subject: variations of sed on True 64 Unix
Date: Fri, 13 Oct 2000 15:17:17 +0000	[thread overview]
Message-ID: <97144972324098.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~2000-10-13 15:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox