My script use and modifies a shell variable. I need to always use:
source myscript
Is there a shorter way to call this script and have it modify the current shell's environment?
It can be elegantly done by using functions use as described in this answer, but I need a faster way.
.bashrc
)? I ask because it never occurred to me wrapping it in a function would imply a performance deficit (if this is indeed the case). I suppose I could test this withtime
? – Emanuel Berg Sep 16 '12 at 21:51