tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* variations of sed on True 64 Unix
@ 2000-10-13 15:17 Sherman Owens
  0 siblings, 0 replies; only message in thread
From: Sherman Owens @ 2000-10-13 15:17 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-10-13 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-13 15:17 variations of sed on True 64 Unix Sherman Owens

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