This I need quotes in a cronjob which I am creating through a chef recipe but even though I escape the quotes they do not appear in the cronjob which is created.
bash "Add cron" do
  user root
  group root
  code <<-EOH
      (
        (crontab -l; echo "5 0 * * * /bin/find #{node['user']['dir']}/files/ -type f \\( -name \"*.csv\" -o -name \"*.csv.bad\" -o -name \"*.ctrl\" \\) -mtime +1 -print0 | xargs -0 gzip -f" ) | crontab -
       )     
  EOH
end
just to clarify the cron job I want to end up with should contain -name "*.csv"
but what I actually get is -name *.csv