#!/bin/csh
##################################
# Add the T5/T6 (correspondance)
##################################

if (! $?theFile)  set theFile = "$1"
if ("$theFile" =~ *19*) then
    set icol = 1
else
    set icol = 3
endif

set lines = `tabmap -data -map '${RAh}' $theFile | wc -l`
tabmap -data -ascii 'RAh RAm RAs DE- DEd DEm DEs' table19.dat \
| gawk -f xmatch.awk | gawk -F= -v i=$icol -v lines=$lines '\
  BEGIN{while(getline>0) N[$i+0]=1;\
  for (n=1; n<=lines; n++) { if(n in N) print "y"; else print "" }}'
