Link to home
Start Free TrialLog in
Avatar of David Aldridge
David AldridgeFlag for United States of America

asked on

Writing a heredoc to a file

I'm having an issue with trying to get a heredoc in a ksh script to write to a file.  I have used the following code.  It creates the file, but doesn't write anything in it.

Thanks!
David

CFGFILE=/home/share/daldrid/work/tasks/bmc/configfile/agenthwdebug.txt

echo <<EOF > $CFGFILE
PATROL_CONFIG

  "/SENTRY/HARDWARE/debugEndTime" = { REPLACE = "$DATE $TIME" },

  "/SENTRY/HARDWARE/debugMode" = { REPLACE = "1" },

  "/SENTRY/HARDWARE/automaticReinitialization" = { REPLACE =  "1" }
EOF
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Aldridge

ASKER

As usual, perfect, ozo.  Thanks again!