Как остановить скрипт, если он был запущен с помощью bash test.sh или ./test.sh?
# if the script was run with bash test.sh or ./test.sh, stop echo "From here the script only works if it has been run with source test.sh or . test.sh"