Hi my problem is that my Solaris server will receive emails from another Lotus Notes mail server. It will send the emails to the .forward of an email account. The .forward will then call another UNIX script to process the emails. One day I found that if an email contains ".-" (exclude double quotes" characters t end of line and then a line break in the subject, when my script reads that line, the program seems to hang up and occupies almost all CPU. I tried to replace those characters when reading lines but in vain. The general code of the script is as follows:
-----------------------------------------
#!/bin/ksh
LOGS=/export/home/ewp01/maillog/`date +"%Y%m%d_%H%M%S_"`.log
while read -r `echo line|sed "s/\.\-/\.\-/g"`
do
line2=`echo $line | sed "s/\.\-/\.\-/g"`
print -r $line2 >> $LOGS
## business logic ##
done
## business logic ##
------------------------------------------
Do you encounter such strange problem?
-----------------------------------------
#!/bin/ksh
LOGS=/export/home/ewp01/maillog/`date +"%Y%m%d_%H%M%S_"`.log
while read -r `echo line|sed "s/\.\-/\.\-/g"`
do
line2=`echo $line | sed "s/\.\-/\.\-/g"`
print -r $line2 >> $LOGS
## business logic ##
done
## business logic ##
------------------------------------------
Do you encounter such strange problem?