LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   got a syntax error which shows unexpected end of line when tried to run a shell scrip (https://www.linuxquestions.org/questions/linux-newbie-8/got-a-syntax-error-which-shows-unexpected-end-of-line-when-tried-to-run-a-shell-scrip-275963/)

racer_mec 01-10-2005 01:03 AM

got a syntax error which shows unexpected end of line when tried to run a shell scrip
 
Hello,

I have installed a 3rd party tool called jspider in redhat 8.When i tried to run the same using ./jspider.sh i got a message like this

[root@siva bin]# ./jspider.sh
: bad interpreter: No such file or directory


Then i tried with using sh jspider.sh then also got an error message but this time a different one.it is as follows and the important thing is there is no 16th line

[root@siva bin]# sh jspider.sh
------------------------------------------------------------
JSpider startup script
: command not found
jspider.sh: line 16: syntax error: unexpected end of file


I am giving the entire shell script down below


#!/bin/sh
# $Id: jspider.sh,v 1.3 2002/12/24 10:52:22 vanrogu Exp $
echo ------------------------------------------------------------
echo JSpider startup script

if [ ! -d "$JSPIDER_HOME" ]; then
echo JSPIDER_HOME does not exist as a valid directory : $JSPIDER_HOME
echo Defaulting to current directory
JSPIDER_HOME=/home/tony/tcs/jspider/jspider
fi

echo JSPIDER_HOME=$JSPIDER_HOME
echo ------------------------------------------------------------

java -cp ../lib/jspider.jar -Djspider.home=$JSPIDER_HOME net.javacoding.jspider.JSpider $1 $2





i am a beginner .So please do reply

mufy 01-10-2005 01:43 AM

Things looked different when I ran the same in mine Siva. And yeah, welcome to linuxquestions.org.

[mufeed@gateway shell]$ ./siva
------------------------------------------------------------
JSpider startup script
JSPIDER_HOME does not exist as a valid directory :
Defaulting to current directory
JSPIDER_HOME=/home/tony/tcs/jspider/jspider
------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: net/javacoding/jspide r/JSpider

Regards,
Mufy


All times are GMT -5. The time now is 01:46 AM.