title: Bash script to receive and repass quoted parameters
body: <p>I'm trying to get quoted parameters of a bash script to safely be received by a nested script. Any ideas?</p>
  
  <p>test.sh</p>
  
  <pre><code>#!/bin/bash
  echo $*
  bash myecho.sh $*
  </code></pre>
  
  <p>myecho.sh</p>
  
  <pre><code>#!/bin/bash
   echo $1
   echo $2
   echo $3
   echo $4
  </code></pre>
  
  <p>Sample:</p>
  
  <pre><code>bash test.sh aaa bbb '"ccc ddd"'
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>aaa bbb "ccc ddd"
  aaa
  bbb
  "ccc
  ddd"
  </code></pre>
  
  <p>Wanted result</p>
  
  <pre><code>aaa bbb "ccc ddd"
  aaa
  bbb
  ccc ddd
  </code></pre>