How do you return to a sourced bash script?

后端 未结 3 2132
后悔当初
后悔当初 2020-12-01 13:40

I use "source" inside a bash script, as follows:

#!/bin/bash
source someneatscriptthatendsprematurely.sh

I would like to exit from

3条回答
  •  醉梦人生
    2020-12-01 14:22

    Is it important that you can change environment variables? Since otherwise you can just execute the script by executing it without source:

    someneatscriptthatendsprematurely.sh
    

提交回复
热议问题