Date variables in bash using lynx on BSD

Any idea why the top line does not work but the bottom one does?

/usr/local/bin/lynx -dump -width=1000 http://www.url.com/$(date +'%d-%B-%Y')/ > /usr/local/www/apache24/data/temp/1.txt
/usr/local/bin/lynx -dump -width=1000 http://www.url.com/$(date -v-1d +'%d-%B-%Y')/ > /usr/local/www/apache24/data/temp/22.txt

Thanks Chris

1 answer

  • answered 2018-04-14 15:43 Chris

    I'm an idiot. Bad formatting. I ran dos2unix on the script and it works fine now.