source . ./script
source is a synonym for dot/period ' . ' in bash, but not in POSIX sh, so for maximum compatibility use the period. When a script is run using source it runs within the existing shell, any variables created or modified by the script will remain available after the script completes. In contrast if the script is run just as filename , then a separate subshell (with a completely separate set of variables) would be spawned to run the script. ubu1404@ubuntu1404lb01:~$ bash script Thu Mar 8 08:02:09 PST 2018 ubu1404@ubuntu1404lb01:~$ source script bash: source: /usr/bin/script: cannot execute binary file ubu1404@ubuntu1404lb01:~$ script Script started, file is typescript ubu1404@ubuntu1404lb01:~$ mv script scr ubu1404@ubuntu1404lb01:~$ bash scr Thu Mar 8 08:02:47 PST 2018 ubu1404@ubuntu1404lb01:~$ source scr Thu Mar 8 08:02:51 PST 2018 ubu1404@ubuntu1404lb01:~$ ./scr Thu Mar 8 08:02:56 PST 2018 ubu1404@ubuntu1404lb01:~$ . ./scr T...