Let's say I have a script:

echo "$1"
if [[ ! $1 ]]; then
    echo "True"
export ABC="/home/aashish"

ABC is not available after the execution of this script. How can I make that variable persist after the execution as well?

marked as duplicate by Kusalananda shell-script Jan 3 at 10:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


source it into current shell session.

Not the answer you're looking for? Browse other questions tagged or ask your own question.