I am battling with an old AIX server and old version of KSH to create a script that will toggle comments in a file
in order to update which server is active.
The issue is the here document and ed command do not execute. The script runs without errors but the subtitution that I expect to happen isn't.
Below is the block of code related to ed and the here document:
ed $F_NAME <<EOF
1,\$s/#10.7.1.239 genesis jde/10.7.1.239 genesis jde/g
1,\$s/10.7.1.234 genesis jde/#10.7.1.239 genesis jde/g
w
EOF
Thank you in advance for your assistance.
I.T. where a world of choas and confusion comes down to nothing but 1s and 0s.
in order to update which server is active.
The issue is the here document and ed command do not execute. The script runs without errors but the subtitution that I expect to happen isn't.
Below is the block of code related to ed and the here document:
ed $F_NAME <<EOF
1,\$s/#10.7.1.239 genesis jde/10.7.1.239 genesis jde/g
1,\$s/10.7.1.234 genesis jde/#10.7.1.239 genesis jde/g
w
EOF
Thank you in advance for your assistance.
I.T. where a world of choas and confusion comes down to nothing but 1s and 0s.