Bash interactive scripting basics

A variable looks like this: export FOO=bar To get a variable in your interactive shell, source the script that contains it as such: source script_that_contains_FOO echo $FOO A function looks like this: function foo() { echo foo } To run a function in your interactive shell, source the script and call the function like this: source script_that_contains_foo foo To debug something that’s wrapped in a bash function or script, set the -x option. [Read More]
linux  bash