Hi<br><br>As Conrad stated, you have to set the shell line.<br>The very first line of your script has to start with #!/full/path/to/shell<br>#! must be the first characters on the very first line.<br><br>Of course, this will vary from system to system.<br>
By default, a shell script will try run in whatever shell you are in.<br>However, by changing the first line, you can force it to run in a different shell.<br>It's a handy way of ensuring that a shell script runs in the correct shell.<br>
<br>Regards<br>    Vernon<br><br><br><br><div class="gmail_quote">On Mon, Sep 13, 2010 at 5:22 PM, Jayanta Kundu <span dir="ltr"><<a href="mailto:jayantak007@gmail.com">jayantak007@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Hi Vernon,</div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"></font> </div>
<div class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">First of all I would like to say thank for your early reply.</font></div>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"> </font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font size="3"><font face="Calibri">If I change the name of the file from <span>“ABL_CB_ERROR.sh” to “ABL_CB_ERROR.ksh” and execute the same via “$./runclient.sh start” it’s giving same error in the log file like: </span></font></font></p>
<div class="im">

<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span><font size="3"><font face="Calibri">/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an identifier</font></font></span></p>

<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span><font face="Calibri" size="3"> </font></span></p>
</div><p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><font face="Calibri"><span style="font-size: 12pt;">“ABL_CB_ERROR.ksh” file look like:</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></font></p>
<div class="im">

<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><font face="Calibri"><span style="font-size: 12pt;">Version=1.0a</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></font></p>


<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><font face="Calibri"><span style="font-size: 12pt;"># Debug-Mode ? (y/Y/N)</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></font></p>


<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><font face="Calibri"><span style="font-size: 12pt;">[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export DEBUG="N"</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></font></p>


<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><font face="Calibri"><span style="font-size: 12pt;">- - - - - - - -- - - - - - - -- - - - - - - -</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></font></p>


<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal;"><font face="Calibri"><span style="font-size: 12pt;">- - - - - - - -- - - - - - - -- - - - - - - -</span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></font></p>


<p class="MsoNormal" style="margin: 0in 0in 6pt; line-height: normal;"><span style="font-size: 12pt;"><font face="Calibri">- - - - - - - -- - - - - - - -- - - - - - - -</font></span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"></span></p>


</div><div>With Regards,</div>
<div>Jayanta.<font color="#888888"><br><br></font></div><div><div></div><div class="h5">
<div class="gmail_quote">On Mon, Sep 13, 2010 at 1:45 PM, Vernon Everett <span dir="ltr"><<a href="mailto:everett.vernon@gmail.com" target="_blank">everett.vernon@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="padding-left: 1ex; margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);">Hi<br><br>sh does not support the syntax<br><span style="font-family: courier new,monospace;">export VARIABLE=value</span><br>

This is a ksh and bash syntax.<br><br>If you are using sh you need to do it as two commands.<br><span style="font-family: courier new,monospace;">DEBUG="N"</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">export DEBUG</span><br>
<br>Regards<br><font color="#888888">     Vernon</font> 
<div>
<div></div>
<div><br><br><br>
<div class="gmail_quote">On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu <span dir="ltr"><<a href="mailto:jayantak007@gmail.com" target="_blank">jayantak007@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="padding-left: 1ex; margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);">
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">Hi Guys,</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"> </font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">I am writing my own KPI(named “ABL_CB_ERROR.sh”) and keep it into the /export/home/xymon /client/script/ path and configure it into “clientlaunch.cfg” file in Agent(Client) side and also configure bb-host configuration file in the Collector(Server) side.</font></p>


<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">In the “ABL_CB_ERROR.sh” file very first line it is giving following error:</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an identifier</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"> </font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font size="3"><font face="Calibri"><span> </span>“ABL_CB_ERROR.sh” file look like:</font></font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">Version=1.0a</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"># Debug-Mode ? (y/Y/N)</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export DEBUG="N"</font></p>


<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">- - - - - - - -- - - - - - - -- - - - - - - -</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">- - - - - - - -- - - - - - - -- - - - - - - -</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">- - - - - - - -- - - - - - - -- - - - - - - -</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"> </font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">How can I resolve this issue? Kindly provide me the solution.</font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3"> </font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font face="Calibri" size="3">With Regards,</font></p><span style="font-size: 11pt; line-height: 115%;">Jayanta.</span> </blockquote></div><br></div></div></blockquote></div>

<br>
</div></div></blockquote></div><br>