Hi,
I have the following script which calls a program that asks for user input before progressing. I am new to scripting and this script was written by the previous admin. After $MERGE is executed the application associated with it needs user input - asks for 'Enter' to be pressed. At the moment the output is being redirected to /dev/null. I need to know how to script this. I have seen in other threads that you place a \r (carriage return) into the script. I don't know exactly how to do this though. Thanks for your help.
MERGE="/opt/application/application
$MERGE @list merged.pdf > /dev/null 2>&1
if \(\( $? != 0 \)\)
then
print "Merging files $patid_prev failed." >> $LOGFILE
else
patno=\`echo $patid_prev | awk '\{printf\("%06d",$1\)\}'\`
mv merged.pdf "$STARCH_DIR/$\{studyno\}-$\{patno\}.pdf"
fi
$MERGE > /dev/null 2>&1
if (( $? != 0 ))
then
print "PDF-Meld is not installed or not accessible." >> $LOGFILE
print "" >> $LOGFILE
print "Program aborted." >> $LOGFILE
rm -rf $WORKDIR
exit 1
fi