Created
June 8, 2011 05:39
-
-
Save r2k0/1013839 to your computer and use it in GitHub Desktop.
Perl script for checking stock prices in CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
while (@ARGV) { | |
$stocks=$ARGV[0]; | |
shift @ARGV; | |
print "$stocks\t"; | |
system("curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s=$stocks&f=l1'") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage example:
./stocks ERTS GOOG INTC MSFT
ERTS 23.35
GOOG 519.03
INTC 22.06
MSFT 24.06