Unwanted line print in HTML

Hello Experts,
we have a HTML code like :-
[root@200]# cat SHBODLogs.sh
#!/bin/bash

echo "</pre><br/><br/><u>MRComponents</u><br/><br/>"
echo "<table border=1 style='font-family:Calibri;font-size:11px'><tr><td><b>PID</b></td><td>" | awk '{print $0"<b>Application</b></td><td><b>Socket</b></td></tr>"}';
ps ax | awk '($3 ~ /[RS]/) && ($5 !~ /gnome-terminal/) && ($5 ~ /active/||/BroadCast/||/TServer/||/Broadcast/||/GOCONNECTION/||/POS/||/CM/||/CC/||/SMM/||/DoubleAgent/) && ($5 !~ /awk/) && ($5 !~ /sh/) {print "<tr><td>"$1"</td><td>"$5"</td><td>"$6"&nbsp;&nbsp;"$7"</td></tr>"}'
echo "</table><br/>";

HTML Output :-

HTML OutputHTML Output</pre><br/><br/><u>MRComponents</u><br/><br/>
<table border=1 style='font-family:Calibri;font-size:11px'><tr><td><b>PID</b></td><td><b>Application</b></td><td><b>Socket</b></td></tr>
<tr><td>27359</td><td>./CM</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27380</td><td>./SMM</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27392</td><td>./CC</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27484</td><td>./POS</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27525</td><td>./CONNECTION</td><td>&nbsp;&nbsp;</td></tr>
<tr><td>27550</td><td>./ACTIVE</td><td>1&nbsp;&nbsp;</td></tr>
<tr><td>27579</td><td>./ACTIVE</td><td>2&nbsp;&nbsp;</td></tr>
<tr><td>27659</td><td>./BroadCast</td><td>1&nbsp;&nbsp;</td></tr>
<tr><td>27696</td><td>./BroadCast</td><td>2&nbsp;&nbsp;</td></tr>
<tr><td>29038</td><td>/usr/local/bin/SrvrHwdInfoBODLogs</td><td>-c&nbsp;&nbsp;#!/bin/bash?#</td></tr>
<tr><td>29052</td><td>/usr/local/bin/SrvrHwdInfoBODLogs</td><td>-c&nbsp;&nbsp;#!/bin/bash?#</td></tr>
</table><br/>

Output attached. My question is why automatically print mention line in output file (SHBODLogs.html), i don't want print this line in output.

<tr><td>29038</td><td>/usr/local/bin/SrvrHwdInfoBODLogs</td><td>-c&nbsp;&nbsp;#!/bin/bash?#</td></tr>
<tr><td>29052</td><td>/usr/local/bin/SrvrHwdInfoBODLogs</td><td>-c&nbsp;&nbsp;#!/bin/bash?#</td></tr>
HTML.jpg
LVL 1
Rajat SehgalFounder Enhance TechnologyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
because the ps ax command produced a line something like
29038  ?? S 0:00 /usr/local/bin/SrvrHwdInfoBODLogs -c #!/bin/bash?# CC
If you want to exclude it, you might add a && ($5 !~ /SrvrHwdInfoBODLogs/)
condition to your bash script,
or perhaps when you said
($5 ~ /active/||/BroadCast/||/TServer/||/Broadcast/||/GOCONNECTION/||/POS/||/CM/||/CC/||/SMM/||/DoubleAgent/)
you may have meant to say
($5 ~ /active|BroadCast|TServer|Broadcast|GOCONNECTION|POS|CM|CC|SMM|DoubleAgent/)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.