Jan 31, 2006 #1 pho01 Programmer Mar 17, 2003 218 US In the $Statusfile, i want to replace XX-${UNIQUEID}-XX to Pending + new line. How do you insert a newline on this? (/"Pending"/) cat ${STATUSFILE} | sed -e s/"XX-${UNIQUEID}-XX"/"Pending"/ > ${RUNDIR}/status.new Thanks
In the $Statusfile, i want to replace XX-${UNIQUEID}-XX to Pending + new line. How do you insert a newline on this? (/"Pending"/) cat ${STATUSFILE} | sed -e s/"XX-${UNIQUEID}-XX"/"Pending"/ > ${RUNDIR}/status.new Thanks
Feb 2, 2006 1 #2 bnothos Programmer Nov 6, 2003 24 CA try cat ${STATUSFILE} | sed -e s/"XX-${UNIQUEID}-XX"/"Pending\n"/ > ${RUNDIR}/status.new or cat ${STATUSFILE} | sed -e s/"XX-${UNIQUEID}-XX"/"Pending^M"/ > ${RUNDIR}/status.new to get the control M try control V then control M Upvote 0 Downvote
try cat ${STATUSFILE} | sed -e s/"XX-${UNIQUEID}-XX"/"Pending\n"/ > ${RUNDIR}/status.new or cat ${STATUSFILE} | sed -e s/"XX-${UNIQUEID}-XX"/"Pending^M"/ > ${RUNDIR}/status.new to get the control M try control V then control M
Feb 16, 2006 Thread starter #3 pho01 Programmer Mar 17, 2003 218 US Thanks bnothos! \n doesn't work and i tried it before. ^M did. Cool! Upvote 0 Downvote