title: Copying files with wildcard (*) to a folder in a bash script - why isn't it working?
body: <p>I am writing a bash script that creates a folder, and copies files to that folder. It works from the command line, but not from my script. What is wrong here?</p>
  
  <pre><code>#! /bin/sh
  DIR_NAME=files
  
  ROOT=..
  FOOD_DIR=food
  FRUITS_DIR=fruits
  
  rm -rf $DIR_NAME
  mkdir $DIR_NAME
  chmod 755 $DIR_NAME
  
  cp $ROOT/$FOOD_DIR/"*" $DIR_NAME/
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>cp: cannot stat `../food/fruits/*': No such file or directory
  </code></pre>