Hello All,
I cannot for the life of me remember how to do the following is SED:
OLD_STRING="MAIN_CE MSG_OUTPUT /ctsa/controlsa/logs/CE_MSG.%s"
NEW_STRING="MAIN_CE MSG_OUTPUT /ctsa/controlsa/logs/CE_MSG.##G1##.%s.log"
echo "Changing the MAIN_CS paramater to enable log rotation"
sed "s/${OLD_STRING}/${NEW_STRING}/g" ${CTSPARM} > ${CTSPARM}.work
In this script the old new and old strings contain / various other characters which seem to be being interpreted as pattern seperators, thus causing an error in SED. Does anyone know how to replace the old string with the new string in this instance?
Many Thanks for you help
I cannot for the life of me remember how to do the following is SED:
OLD_STRING="MAIN_CE MSG_OUTPUT /ctsa/controlsa/logs/CE_MSG.%s"
NEW_STRING="MAIN_CE MSG_OUTPUT /ctsa/controlsa/logs/CE_MSG.##G1##.%s.log"
echo "Changing the MAIN_CS paramater to enable log rotation"
sed "s/${OLD_STRING}/${NEW_STRING}/g" ${CTSPARM} > ${CTSPARM}.work
In this script the old new and old strings contain / various other characters which seem to be being interpreted as pattern seperators, thus causing an error in SED. Does anyone know how to replace the old string with the new string in this instance?
Many Thanks for you help