Find the answer to your Linux question:
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% ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,345
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •