#!/bin/tcsh -f #(ie run the tshell on this but don't read the .cshrc or .tcshrc) echo version = 1.03 of yvpa 2009 Dec 23 # 2009 Dec 23, 1.03: name tmp files .html so they can be viewed in the browser # 2008 Jan 12, 1.02: give command line at end # 2007 Nov 01, 1.01: ayvp -> yvpa; uses yvph # 2007 Sep 1, 1.00: origin if ($#argv < 1) then echo 'usage: yvpa [year] [volume] [page]' echo ' or ' echo ' yvpa [volume] [page]' echo ' or ' echo ' yvpa [year] [volume] [page] [another key]' echo 'Find article with given year/volume/page in PubMed' echo "by using yvp and yvph to create an html file in your 'a' directory." echo "See the 'a' script for further details." exit endif # output of yvp: # set tmp1 = /tmp/`whoami`-1.yvpa # html file being created: set tmp2 = /tmp/`whoami`-2-`tomdate '-'`-yvpa.html # echo -n "" > $tmp1 if ($#argv == 2) then yvph $1 $2 > $tmp2 endif if ($#argv == 3) then yvph $1 $2 $3 > $tmp2 endif if ($#argv == 4) then yvph $1 $2 $3 $4 > $tmp2 endif a $tmp2 sleep 1 echo --------------------------------------- echo $0 $1 $2 $3 $4 echo --------------------------------------- # echo --- # set url = "`tail -1 $tmp1`" # echo "$url" # echo --- # echo '' > $tmp2 # echo '> $tmp2 # echo hi there # echo ">$url" >> $tmp2 # echo '' >> $tmp2 # echo --- # cat $tmp2 # a $tmp2