Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

syntax error near unexpected token

10438May 20 2009 — edited May 21 2009
OS: SuSE Linux Enterprise Server 10

Hello All,

We wrote script as below to track error in our log file.
But getting error:

SrchKey="SRVE0133E: An error occurred while parsing parameters. java.io.IOException"
LogFile=/opt/dn/tst/PortalServer/log/SystemOut.log
MailTo="DN@mail.com"
[ ! -f /var/tmp/alert.last ] && touch /var/tmp/alert.last
egrep '$SrchKey' $LogFile > /var/tmp/alert.new
if [ -s /var/tmp/alert.new ] ;then
diff /var/tmp/alert.new /var/tmp/alert.last > /var/tmp/alert.msg
cp /var/tmp/alert.new /var/tmp/alert.last
{ -s /var/tmp/alert.msg ] &&
mailx -s "$SrchKey Alert" $MailTo < /var/tmp/alert.msg
fi
./err_tarck.sh
./err_tarck.sh: line 11: syntax error near unexpected token `fi'
./err_tarck.sh: line 11: `fi'

Any help will be appriciated. thx


D
This post has been answered by Tommy.Reynolds-Oracle on May 20 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2009
Added on May 20 2009
13 comments
4,265 views