So I am working on trying to write shell scripts in linux and I have one that goes out and grabs current stock quotes and would like to save this in a txt or json format. It seems like I can run the script in the terminal, but when I set it up on crontab, it seems to fail. Can someone shed a little light, here is what I have so far.
Cron job:
#!/usr/bin
* * * * * PATH=$PATH:/usr/local/bin:/usr/bin && export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH && /home/mint/Desktop/BashScripts/Stocks/GetStocks.sh
Shell script:
#!/bin/bash
* * * * * echo -e "[{'Ford':' $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1') ', 'Square':' $(curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=sq&f=l1') ' }]" > stocks.txt
Error:
/home/mint/Desktop/BashScripts/Stocks/GetStocks.sh: line 2: dead.letter: command not found