title: Error executing shell command in pig script
body: <p>I have a pig script where in the beginning I would like to generate a string of the dates of the past 7 days from a certain date (later used to retrieve log files for those days). 
  I attempt to do this with this line:
      %declare CMD7 <code>input= ; for i in {1..6}; do  d=$(date -d "$DATE -i days" "+%Y-%m-%d"); input="\$input\$d,"; done; echo \$input</code></p>
  
  <p>I get an error :
      " ERROR 2999: Unexpected internal error. Error executing shell command: input= ; for i in {1..6}; do  d=$(date -d "2012-07-10 -i days" "+%Y-%m-%d"); input="$input$d,"; done;. Command exit with exit code of 127"<br>
   however the shell command runs perfectly fine outside of pig. I am really not sure what is going wrong here. </p>
  
  <p>Thank you!</p>