Xymon Mailing List Archive search

DEBUG=N: is not an identifier

7 messages in this thread

list Jayanta Kundu · Mon, 13 Sep 2010 12:59:01 +0530 ·
Hi Guys,


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.

In the “ABL_CB_ERROR.sh” file very first line it is giving following error:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


 “ABL_CB_ERROR.sh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -


How can I resolve this issue? Kindly provide me the solution.


With Regards,
Jayanta.
list Vernon Everett · Mon, 13 Sep 2010 16:15:39 +0800 ·
Hi

sh does not support the syntax
export VARIABLE=value
This is a ksh and bash syntax.

If you are using sh you need to do it as two commands.
DEBUG="N"
export DEBUG

Regards
     Vernon
quoted from Jayanta Kundu


On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Guys,


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.

In the “ABL_CB_ERROR.sh” file very first line it is giving following error:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


 “ABL_CB_ERROR.sh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -


How can I resolve this issue? Kindly provide me the solution.


With Regards,
Jayanta.
list Jayanta Kundu · Mon, 13 Sep 2010 14:52:43 +0530 ·
Hi Vernon,

First of all I would like to say thank for your early reply.


If I change the name of the file from “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:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


“ABL_CB_ERROR.ksh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -
With Regards,
Jayanta.
quoted from Vernon Everett

On Mon, Sep 13, 2010 at 1:45 PM, Vernon Everett <user-b3f8dacb72c8@xymon.invalid>wrote:
Hi

sh does not support the syntax
export VARIABLE=value
This is a ksh and bash syntax.

If you are using sh you need to do it as two commands.
DEBUG="N"
export DEBUG

Regards
     Vernon


On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Guys,


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.

In the “ABL_CB_ERROR.sh” file very first line it is giving following
error:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


 “ABL_CB_ERROR.sh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -


How can I resolve this issue? Kindly provide me the solution.


With Regards,
Jayanta.
list Conrad Rockenhaus · Mon, 13 Sep 2010 07:40:39 -0400 ·
Hello,

Remember to change the shell line to #!/bin/ksh, or wherever your ksh  shell is kept.  That's needed so the current env knows which shell to  use.

Regards,

Conrad

Sent from my iPod
quoted from Jayanta Kundu

On Sep 13, 2010, at 5:22 AM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>  wrote:
Hi Vernon,

First of all I would like to say thank for your early reply.

If I change the name of the file from “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:
/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an  identifier

“ABL_CB_ERROR.ksh” file look like:
Version=1.0a
# Debug-Mode ? (y/Y/N)
[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export  DEBUG="N"
- - - - - - - -- - - - - - - -- - - - - - - -
- - - - - - - -- - - - - - - -- - - - - - - -
- - - - - - - -- - - - - - - -- - - - - - - -
With Regards,
Jayanta.

On Mon, Sep 13, 2010 at 1:45 PM, Vernon Everett <user-b3f8dacb72c8@xymon.invalid > wrote:
Hi

sh does not support the syntax
export VARIABLE=value
This is a ksh and bash syntax.

If you are using sh you need to do it as two commands.
DEBUG="N"
export DEBUG

Regards
     Vernon


On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu  <user-d0758a3e63c3@xymon.invalid> wrote:
Hi Guys,

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 “c lientlaunch.cfg” file in Agent(Client) side and also configure bb-ho st configuration file in the Collector(Server) side.
quoted from Jayanta Kundu
In the “ABL_CB_ERROR.sh” file very first line it is giving  following error:
/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an  identifier

 “ABL_CB_ERROR.sh” file look like:
Version=1.0a
# Debug-Mode ? (y/Y/N)
[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export  DEBUG="N"
- - - - - - - -- - - - - - - -- - - - - - - -
- - - - - - - -- - - - - - - -- - - - - - - -
- - - - - - - -- - - - - - - -- - - - - - - -

How can I resolve this issue? Kindly provide me the solution.

With Regards,
Jayanta.

list Vernon Everett · Mon, 13 Sep 2010 20:44:33 +0800 ·
Hi

As Conrad stated, you have to set the shell line.
The very first line of your script has to start with #!/full/path/to/shell
#! must be the first characters on the very first line.

Of course, this will vary from system to system.
By default, a shell script will try run in whatever shell you are in.
However, by changing the first line, you can force it to run in a different
shell.
It's a handy way of ensuring that a shell script runs in the correct shell.
quoted from Conrad Rockenhaus

Regards
    Vernon


On Mon, Sep 13, 2010 at 5:22 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Vernon,

First of all I would like to say thank for your early reply.


If I change the name of the file from “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:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


“ABL_CB_ERROR.ksh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -
With Regards,
Jayanta.

On Mon, Sep 13, 2010 at 1:45 PM, Vernon Everett <user-b3f8dacb72c8@xymon.invalid>wrote:
Hi

sh does not support the syntax
export VARIABLE=value
This is a ksh and bash syntax.

If you are using sh you need to do it as two commands.
DEBUG="N"
export DEBUG

Regards
     Vernon


On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Guys,


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.

In the “ABL_CB_ERROR.sh” file very first line it is giving following
error:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


 “ABL_CB_ERROR.sh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -


How can I resolve this issue? Kindly provide me the solution.


With Regards,
Jayanta.
list Jayanta Kundu · Mon, 13 Sep 2010 18:53:40 +0530 ·
Hi Conrad,


Thanks for your valuable suggestion. Now it’s working fine after set the
shell(ksh) .
quoted from Vernon Everett


With Regards,
Jayanta.

On Mon, Sep 13, 2010 at 5:10 PM, Conrad Rockenhaus <user-4eb733199dce@xymon.invalid>wrote:
 Hello,

Remember to change the shell line to #!/bin/ksh, or wherever your ksh shell
is kept.  That's needed so the current env knows which shell to use.

Regards,

Conrad

Sent from my iPod

On Sep 13, 2010, at 5:22 AM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid> wrote:

  Hi Vernon,

First of all I would like to say thank for your early reply.


If I change the name of the file from “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:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


“ABL_CB_ERROR.ksh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -
With Regards,
Jayanta.

On Mon, Sep 13, 2010 at 1:45 PM, Vernon Everett <user-b3f8dacb72c8@xymon.invalid>wrote:
Hi

sh does not support the syntax
export VARIABLE=value
This is a ksh and bash syntax.

If you are using sh you need to do it as two commands.
DEBUG="N"
export DEBUG

Regards
     Vernon


On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Guys,


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.

In the “ABL_CB_ERROR.sh” file very first line it is giving following
error:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


 “ABL_CB_ERROR.sh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -


How can I resolve this issue? Kindly provide me the solution.


With Regards,
Jayanta.
list Jayanta Kundu · Mon, 13 Sep 2010 18:55:35 +0530 ·
Hi Vernon,


Thanks for your valuable suggestion. Now it’s working fine after setting
the path.
quoted from Jayanta Kundu


With Regards,
Jayanta.

On Mon, Sep 13, 2010 at 6:14 PM, Vernon Everett <user-b3f8dacb72c8@xymon.invalid>wrote:
Hi

As Conrad stated, you have to set the shell line.
The very first line of your script has to start with #!/full/path/to/shell
#! must be the first characters on the very first line.

Of course, this will vary from system to system.
By default, a shell script will try run in whatever shell you are in.
However, by changing the first line, you can force it to run in a different
shell.
It's a handy way of ensuring that a shell script runs in the correct shell.

Regards
    Vernon


On Mon, Sep 13, 2010 at 5:22 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Vernon,

First of all I would like to say thank for your early reply.


If I change the name of the file from “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:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


“ABL_CB_ERROR.ksh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -
With Regards,
Jayanta.

  On Mon, Sep 13, 2010 at 1:45 PM, Vernon Everett <
user-b3f8dacb72c8@xymon.invalid> wrote:
Hi

sh does not support the syntax
export VARIABLE=value
This is a ksh and bash syntax.

If you are using sh you need to do it as two commands.
DEBUG="N"
export DEBUG

Regards
     Vernon


On Mon, Sep 13, 2010 at 3:29 PM, Jayanta Kundu <user-d0758a3e63c3@xymon.invalid>wrote:
Hi Guys,


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.

In the “ABL_CB_ERROR.sh” file very first line it is giving following
error:

/export/home/xymon/client/script/ABL_CB_ERROR.sh: DEBUG=N: is not an
identifier


 “ABL_CB_ERROR.sh” file look like:

Version=1.0a

# Debug-Mode ? (y/Y/N)

[[ "$1" = "Y" ]] || [[ "$1" = "y" ]] && export DEBUG="$1" || export
DEBUG="N"

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -

- - - - - - - -- - - - - - - -- - - - - - - -


How can I resolve this issue? Kindly provide me the solution.


With Regards,
Jayanta.