IBM Connections: Error running “setupCmdLine.sh”

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:

. /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

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”