You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Michael Wechner <mi...@wyona.com> on 2004/06/29 18:17:22 UTC

importing data via tha the command line

I try to import files via the command line:

sh xindice.sh import -c /db -f /home/michi/files

or

sh xindice.sh add_document -c /db -f /home/michi/files/file.xml

but receive the following error

: command not 
foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
: command not 
foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
: command not 
foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
: command not 
foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
/home/michi/build/jakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh: 
line 12: syntax error near unexpecte' token `in
'home/michi/build/jakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh: 
line 12: `case "`uname`" in


any idea what I might do wrong?

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


Re: importing data via tha the command line

Posted by Michael Wechner <mi...@wyona.com>.
Vadim Gritsenko wrote:

> Michael Wechner wrote:
>
>> I try to import files via the command line:
>>
>> sh xindice.sh import -c /db -f /home/michi/files
>>
>> or
>>
>> sh xindice.sh add_document -c /db -f /home/michi/files/file.xml
>>
>> but receive the following error
>>
>> : command not 
>> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
>> : command not 
>> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
>> : command not 
>> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
>> : command not 
>> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
>> /home/michi/build/jakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh: 
>> line 12: syntax error near unexpecte' token `in
>> 'home/michi/build/jakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh: 
>> line 12: `case "`uname`" in
>>
>>
>> any idea what I might do wrong?
>
>
>
> What line endings file has - dos or unix? Try dos2unix.


yes, this seems to help:

dos2unix xindice.sh

sh xindice.sh

is then working.

Maybe it would be good to checkin the "dos2unix xindice.sh" version, because
I guess it won't be used on Windows ...

Thanks

Michi

> You can also send a patch to build.xml if you know what's the problem.
>
> Vadim
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


Re: importing data via tha the command line

Posted by Michael Wechner <mi...@wyona.com>.
Vadim Gritsenko wrote:

>
>
> What line endings file has - dos or unix? Try dos2unix. You can also 
> send a patch to build.xml if you know what's the problem.


I guess you mean the file bin/xindice ...

I will take a closer look at it.

Thanks

Michi

>
>
> Vadim
>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


Re: importing data via tha the command line

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Michael Wechner wrote:

> I try to import files via the command line:
>
> sh xindice.sh import -c /db -f /home/michi/files
>
> or
>
> sh xindice.sh add_document -c /db -f /home/michi/files/file.xml
>
> but receive the following error
>
> : command not 
> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
> : command not 
> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
> : command not 
> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
> : command not 
> foundakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh:
> /home/michi/build/jakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh: 
> line 12: syntax error near unexpecte' token `in
> 'home/michi/build/jakarta-tomcat-4.1.24-LE-jdk14/webapps/xindice/WEB-INF/xindice.sh: 
> line 12: `case "`uname`" in
>
>
> any idea what I might do wrong?


What line endings file has - dos or unix? Try dos2unix. You can also 
send a patch to build.xml if you know what's the problem.

Vadim