In order to run an executable file, I need to run all the commands in the below bash file first, so I just put those commands in the bash file and run the bash file first, but running the bash file doesn't work, I have to run the 4 commands one by one in the terminal and then run my executable file in the same terminal
, why do I have to do this, why running the bash file doesn't acheive the same as running the commands one by one:
#!/bin/bash
export LD_LIBRARY_PATH=/repo/$USER/ncmain/out/rcpi/ITC_CXA11466/x86/lib
export ITC_RUNDIR_PATH=/local/scratch/$USER/itc/
export ITC_INSTANCE_NAME=itc_$USER
/local/scratch/ehhozzo/RCS_ROOT/software/itcworld
$ . bash_file.sh
- you will probably get the result you're looking for. What command do you execute to try to run the bash file, and what results do you get? – John Mar 06 '15 at 19:15./start.bash
, I got nothing output, it just sets some env variable. – betteroutthanin Mar 06 '15 at 19:17source
works, but why? – betteroutthanin Mar 06 '15 at 19:19