title: Providing no arguments to sourced script
body: <p>I have a bash script that can be "configured", as it sources the file located at the first argument. Now I want to pass all other arguments as arguments to the script sourced. When I pass parameters, everything is as I expect it. But when I don't pass parameters, the parameters from my outer script are taken instead.</p>
  
  <p>Suppose I have the following two scripts:</p>
  
  <p>outer.sh</p>
  
  <pre><code>#!/bin/bash
  
  echo ${@}
  MYARGS=${@:2}
  echo $MYARGS 
  
  . inner.sh $MYARGS
  </code></pre>
  
  <p>inner.sh</p>
  
  <pre><code>echo "inner arguments: $@"
  echo "first: $1"
  </code></pre>
  
  <p>Results on the command line:</p>
  
  <pre><code>$ ./outer.sh one two #this is what I expected
  one two
  two
  inner arguments: two
  first: two
  
  $ ./outer.sh one #this is what puzzles me
  one
  
  inner arguments: one
  first: one
  </code></pre>
  
  <p>The result of the first invocation of my script is exactly what I expect, as I provided the parameter <code>two</code>. But the second invocation shows what I am trying to achieve: I don't any arguments passed to the script.</p>
  
  <p>Is there any solution, which does not require me to change the values of the variables in my outer script?</p>