summaryrefslogtreecommitdiff
path: root/biblio/tib/tibabb.sh
blob: df4d4b19c15bee379f0d4d30342c4e6524af6767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/csh -f
#
#  tibabb --  look up a journal and find the tib abbreviation for it 
#
#  Usage:  tibabb  < keys >...
#
#  Note: this is case sensitive if there is more than one word in the keys
#
if ($#argv == 1 && "$1" == -usage) then
  echo " Usage:  tibabb < keys > ..."
  exit 0
endif
switch ($#argv)
  case 0:
    echo " Usage:  tibabb < keys > ..."
    exit 1
  case 1:
    grep -i -h $1 BBBBB/*{abb,fll}.ttz|more
    breaksw
  default:
    set arg = `echo $* | sed 's, ,/ \&\& /,g'`
    awk "/$arg/" BBBBB/*{abb,fll}.ttz|more
endsw