Bash issue dir '.' not found

view story

http://ubuntuforums.org – Hi, I new in bash scripting, and having the following problem. When I run script I get the message "dir '.' not found" Screenshot from 2013-08-21 11:37:20.png But when I enter the same command manually, everything works perfect Screenshot from 2013-08-21 11:38:30.png Code: #!/bin/bashBASEDIR=`dirname "$0"` source "$BASEDIR/environment.sh" if [[ $? != 0 ]]; then exit 1; fi QUERY_VIDEO="$1" FNAME=`basename "$QUERY_VIDEO"` QUERY_DATA_DIR="$BIN_DIR/data_$FNAME" QUERY_SEGMENTATION_CODE="SEGCTE_1/3_SEG" QUERY_SEGMENTAT (Hardware)