Skip to content

Instantly share code, notes, and snippets.

@r2k0
Created June 8, 2011 05:39
Show Gist options
  • Save r2k0/1013839 to your computer and use it in GitHub Desktop.
Save r2k0/1013839 to your computer and use it in GitHub Desktop.
Perl script for checking stock prices in CLI
#!/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'")
}
@r2k0
Copy link
Author

r2k0 commented Jun 8, 2011

usage example:

./stocks ERTS GOOG INTC MSFT
ERTS 23.35
GOOG 519.03
INTC 22.06
MSFT 24.06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment