#!/bin/sh
#########################################
#  From HD,Name, find the note
#########################################
echo1 '' ; echo1 '\begin{soft}'
hd=`echo $1 | acut -d, -f1`
if test -z "$hd"; then
    star=`echo $1 | acut -d, -f2`
else
    star="HD $hd"
    #echo "#star=$star"
fi
#echo1 "{\large\bf{Note on {\fg{red3}$star}}}"
fcat notes.txt | gawk -F: "/^$star"':/{ p=1; \
   printf "{\\bf %s}",$1; for(i=2;i<=NF;i++) printf ":%s", $i; \
   print ""; next}\
  /^[A-Z][A-Z0-9 -]*:/{if(p>0) exit }\
  { if(p==1) print }'
echo1 '\end{soft}'
