This is expected if the variable $ROS_PACKAGE_PATH
is not defined (or equal to "") when echo
is called. If I understand what you are trying to do, then you can just replace the double-quotes with single quote to prevent this behaviour. Thus
echo 'export ROS_PACKAGE_PATH=/home/forklift/forklift-workspace:$ROS_PACKAGE_PATH' >> ~/.bashrc
Should add the line
export ROS_PACKAGE_PATH=/home/forklift/forklift-workspace:$ROS_PACKAGE_PATH
to your .bashrc
.