December 12th, 2007 - Open Knowledge
Dec. 12th, 2007
01:20 am - GEEK: editing groups, using sudo
02:07 pm - Ron Paul blimp — banner going up!
06:22 pm - GEEK: shell script question
[EDIT: it's called a "here document"] Thanks variax!
Suppose you want pass in a complex query to a command line sql interpreter from within a shell script. You can do so with a command like this:
sql92 <<EOF connect to db1 as LASTTRADES user eouser; set format row; select p.fundkey as fundkey, max(t.closed) as last_trade from mposition p, mtrade t where p.primarykey=t.positionkey and t.createdbycorporateaction=0 group by fundkey; EOFThere’s a name for the syntax of the argument: <<EOF...EOF
But for the life of me, I can’t recall it, or find it on the web. Anyone know this off hand?
11:29 pm - ABBA for Ron Paul!
|← Previous day||(Calendar)||Next day →|