I am using cURL to retrieve stock information back to the terminal window on my Mac using the yahoo finance api.
i.e. I type:
curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1'
and it prints the output (in this instance the last trade price in the command line)
It works terrific, but I would like to know how to get this output automatically written to a stock.txt file located on my desktop without any manual intervention upon the execution of the original cURL command.
Thus after I type the curl query that contains the stock ticker, I get the value written in the terminal window and the txt file.