title: AWS CLI S3 CP --recursive function works in console but not in .sh file
body: <p>I have the following line inside of a <code>.sh</code> file:</p>
  <pre><code>aws s3 cp s3://bucket/folder/ /home/ec2-user/ --recursive
  </code></pre>
  <p>When I run this line in the console, it runs fine and completes as expected. When I run this line inside of a <code>.sh</code> file, the line returns the following error.</p>
  <pre><code>Unknown options: --recursive
  </code></pre>
  <p>Here is my full <code>.sh</code> script.</p>
  <pre><code>echo &quot;Test&quot;
  aws s3 cp s3://bucket/folder/ /home/ec2-user/ --recursive
  echo &quot;Test&quot;
  python /home/ec2-user/Run.py
  </code></pre>
  <p>If I manually add the Run.py file (not having it copied over from S3 as desired) and run the script I get the following output.</p>
  <pre><code>Test
  
  Unknown options: --recursive
  Test
  Hello World
  </code></pre>
  <p>If I remove the files which are expected to be transferred by S3 out of the Linux environment and rely on the AWS S3 command I get the following output:</p>
  <pre><code>Test
  
  Unknown options: --recursive
  Test
  python: can't open file '/home/ec2-user/Run.py': [Errno 2] No such file or directory
  </code></pre>
  <p>Note that there are multiple files that can be transferred inside of the specified S3 location. All of these files are transferred as expected when running the AWS command from the console.</p>
  <p>I initially thought this was a line ending error, as I am copying the <code>.sh</code> file over from Windows. I have made sure that my line endings are working and we see this by the rest of the script running as expected. As a result, this issue seems isolated to the actual AWS command. If I remove the <code>--recursive</code> from the call, it will transfer over a single file successfully.</p>
  <p>Any ideas on why the --recursive option would be working in the console but not in the <code>.sh</code> file?</p>
  <p>P.s.</p>
  <pre><code>$ aws --version
  aws-cli/2.1.15 Python/3.7.3 Linux/4.14.209-160.339.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off
  </code></pre>