Here is an excerpt from my Bash script
#!/bin/sh
# Check SPEED parameter validity
if [ "$4" = "SPEED" ]
then
source ${SIM_DIR}/setEnv.sh speed
elif [ "$4" = "NORMAL" ]
then
pushd ${SIM_DIR}/scripts
source setEnv
else
ERROR "Invalid SPEED|NORMAL parameter ($4)."
exit 1
fi
In command line, I am giving the option as NORMAL
when I run the script. There is no file called setEnv.sh
in the ${SIM_DIR}/scripts
location. There is however a file called setEnv
and its first line is #!/bin/bash -x
. I get the following error:
line 176: source: setEnv: file not found
Could anybody kindly point out what is wrong with my script?