While running the setupCmdLine.sh script to set your Websphere environment variables you get the error: “dirname: invalid option — ‘b'”.
This might happen if you start the script (as described in the documentation) from the directory “/opt/IBM/WebSphere/AppServer/bin/”. If you instead run it from the Deployment manager profile, then it should work:
1 |
. /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/setupCmdLine.sh |
Do not forget the leading “. ” in front of the command!
You may check that the variables are set correctly by running
1 |
echo $WAS_HOME |
This variable should now be set to you WAS install directory (e.g. “/opt/IBM/WebSphere/AppServer”)
IBM Connections: Error running “setupCmdLine.sh”
Note: Starting with ./ might result in the effect that the variables asr not set correctly. If “echo $WAS_HOME” returns an empty string, navigate to “/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin” from a console and run “. setupCmdLine.sh”.
It is not “./” but “. /” – do not forget the blank between “.” and “/” which means that the environment variables should be copied to the current environment and not deleted after the script file ends.