syntax error java-heap-graphite.sh


#1

When I execute below shell

/etc/sensu/plugins/java-heap-graphite.sh

I got error

/etc/sensu/plugins/java-heap-graphite.sh:11: syntax error, unexpected tCONSTANT, expecting keyword_do_cond or ‘;’ or ‘\n’
while getopts ‘s:n:h’ OPT; do
^
/etc/sensu/plugins/java-heap-graphite.sh:11: syntax error, unexpected keyword_do_cond, expecting end-of-input

``

is anyone use this plugin?


#2

That looks like a ruby syntax error on a bash script?
Can you verify the she-bang and verify that you are not executing this
plugin with "ruby" ?

···

On Thu, Oct 16, 2014 at 4:08 AM, kinpo Samohan <gashanischeating@gmail.com> wrote:

When I execute below shell
/etc/sensu/plugins/java-heap-graphite.sh

I got error

/etc/sensu/plugins/java-heap-graphite.sh:11: syntax error, unexpected
tCONSTANT, expecting keyword_do_cond or ';' or '\n'
while getopts 's:n:h' OPT; do
                         ^
/etc/sensu/plugins/java-heap-graphite.sh:11: syntax error, unexpected
keyword_do_cond, expecting end-of-input

is anyone use this plugin?


#3

it was my mistake. Thank you for advice!!

2014年10月16日木曜日 23時56分06秒 UTC+9 Kyle Anderson:

···

That looks like a ruby syntax error on a bash script?
Can you verify the she-bang and verify that you are not executing this
plugin with “ruby” ?

On Thu, Oct 16, 2014 at 4:08 AM, kinpo Samohan > gashanis...@gmail.com wrote:

When I execute below shell
/etc/sensu/plugins/java-heap-graphite.sh

I got error

/etc/sensu/plugins/java-heap-graphite.sh:11: syntax error, unexpected
tCONSTANT, expecting keyword_do_cond or ‘;’ or ‘\n’
while getopts ‘s:n:h’ OPT; do
^
/etc/sensu/plugins/java-heap-graphite.sh:11: syntax error, unexpected
keyword_do_cond, expecting end-of-input

is anyone use this plugin?