Thursday, August 20, 2009

Shell Script Error ^ " does not exist.irectory ". ^

I put bunch of XML load statements together in Shell script
adjava -mx128m -nojit oracle.jrad.tools.xml.importer.XMLImporter ./oracle/apps/ap/oie/entry/lines/webui/customizations/site/0/DetailsPG.xml -username apps -password apps -dbconnection "(DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=server.db.com)(PORT=9999)) (CONNECT_DATA=(SID=SID))) " -rootdir .
and some more bundled together..

This script errored as

^ " does not exist.irectory ". ^

Strange error indeed...

I opened the script file to make sure there are no extra spaces etc. Everything looked fine.
I closed vi and ran it again. Still same error.

Did vi on the script.
This time I noticed [dos] in the vi editor opening line at the end where it shows file name,
number of lines etc when you open it fresh.

That clicked. I had ftp'ed the file from desktop to linux.

Ran DOS2UNIX on the shell and executed script.

And bingo ! the script ran smooth.

No comments: