Trouble in Automator's Shell Script after OS X 10.9 Mavericks upgrade
I've got a problem. I use from lot of time an Automator's shell script:
cat >> ~/Dropbox/ClipBoard/Appunti\ Mac\ del\ $(date +\%Y-\%m-\%d).txt
It ever worked but, after Mavericks upgrade, it return an error while running: "ambiguous redirect (1)". Trouble should be depending from date's code, because using
cat >> ~/Dropbox/ClipBoard/Appunti\ Test.txt
it runs correctly. I tried modifying code or adding some quotes, for example
cat >> ~/Dropbox/ClipBoard/Appunti\ Mac\ del\ $ (date “%Y-%m-%d”).txt
but the trouble persists. How can I correct it?
Solution 1:
I think you were close and that the following should work:
cat >> ~/Dropbox/ClipBoard/Appunti\ Mac\ del\ $ (date "+%Y-%m-%d").txt
You had smart quotes in your sample and that won't work and you left out the plus in the quoted format string which you had included in your original.