Results 1 to 2 of 2
Hi
I have to convert the following .bat file content in the .sh file
set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.initial=org.jnp.interfaces.Na mingContextFactory"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.provider.url=jnp://localhost:1099"
set "SECURITY_OPTS= -Djava.security.auth.login.config=D:\jboss-5.0.0.CR2-jdk6\jboss-5.0.0.CR2\server\default\conf\jaas-standard.cfg"
set JAVA_OPTS= %JAVA_OPTS% %SECURITY_OPTS%
echo %JAVA_OPTS%
...
- 10-22-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 7
converting .bat file in .sh file
Hi
I have to convert the following .bat file content in the .sh file
set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.initial=org.jnp.interfaces.Na mingContextFactory"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.provider.url=jnp://localhost:1099"
set "SECURITY_OPTS= -Djava.security.auth.login.config=D:\jboss-5.0.0.CR2-jdk6\jboss-5.0.0.CR2\server\default\conf\jaas-standard.cfg"
set JAVA_OPTS= %JAVA_OPTS% %SECURITY_OPTS%
echo %JAVA_OPTS%
I converted in the following form
JAVA_OPTS="$JAVA_OPTS -Djava.naming.factory.initial=org.jnp.interfaces.Na mingContextFactory"
JAVA_OPTS="$JAVA_OPTS -Djava.naming.provider.url=jnp://localhost:1099"
SECURITY_OPTS="-Djava.security.auth.login.config=<jboss>/server/default/conf/jaas-standard.cfg"
export JAVA_OPTS= "$JAVA_OPTS $SECURITY_OPTS"
I am getting the error that
: command not found :
: command not found5 :
I am not getting what is wrong in the sh file.
Please help me resolve the problem.
Thanks
- 10-22-2010 #2
Does the .sh file have windows style line feeds by any chance?
You can check by either cat -A <SH_FILE> or opening in vim and setting: set list or maybe your graphical editor tells you.
Either way, shell scripts need unix style line feeds.You must always face the curtain with a bow.


Reply With Quote
