title: How to copy all of the files from one directory to another in a bash script
body: <p>I want to copy all of the files from a subdirectory into another directory without copying the original folder.  In a terminal I would just do this:</p>
  
  <pre><code>cp -r dir1/* dir2
  </code></pre>
  
  <p>and then dir2 will contain all of the files from dir1 without containing dir1 itself.  I am trying to replicate this in a bash script and I am getting an error.  Here is my bash code:</p>
  
  <pre><code>cp -r $pck_dir"/*" $TAR_DIR"/pck/"
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>cp: cannot stat ‘./mailman/lists/mailman/*’: No such file or directory
  </code></pre>
  
  <p>This is strange because I can verify that the directory in question exists.  I believe bash is complaining about the '*' but I am not sure why.  Can someone enlighten me as to what I am doing wrong?</p>