These questions address the functionality of
What is the difference between executing a Bash script vs sourcing it?
What does 'source' do?
but I'm confused as to why calling
source in a script passes the script's arguments. E.g. I have these 2 scripts:
source sourced.sh source sourced.sh ""
When I do
./caller.sh arg1 arg2
[arg1 arg2] 
"arg1 arg2" are passed to sourced.sh even though I didn't specify
source sourced.sh $*.
I found that appending "" prevents the arguments from being passed. Is this the recommended way to prevent arguments passed?