I have a utilitarian shell script full of goodies and wish to bring them to the bash environment. I used the command source
before as analogous to import
or include
in other languages.
printer.sh
#!/bin/bash
printAwesome () {
echo "Awesome!"
}
printMoo () {
echo "Moo!"
}
I think it is only running the command source printer.sh
on terminal. Is it really? Do we have any other procedure to follow?
In python, we have environments which we activate
and deactivate
.
printMoo
available as if you were usingfrom printer import printMoo
in Python?source
before..." vs. "I think it is only running the commandsource printer.sh
on terminal." -- what or who is the "it" that is running something there in the second sentence? What do you mean with only running the command "on terminal"?