home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume20 / index-db / part01 / samples / cdwantlist.fmt < prev    next >
Encoding:
Text File  |  1989-10-23  |  650 b   |  49 lines

  1. #!/bin/sh
  2. #
  3. # cdwantlist.fmt - format the cdwantlist database into a nice troff-able list
  4. #
  5. #
  6.  
  7. #
  8. # Put out troff header (set point size, etc.)
  9. #
  10. cat << EOF
  11. .\"
  12. .\" Run me off with "tbl | troff -ms"
  13. .\" Then use "psdit -p/land.pro"
  14. .\"
  15. .nr LL 10i
  16. .nr PO .5i
  17. .nr HM .5i
  18. .nr FM .5i
  19. .nr PS 9
  20. .nr VS 11
  21. .ll 10.0i
  22. .po 0.5i
  23. .pl 8.5i
  24. .ps 9
  25. .vs 11
  26. .TS H
  27. center, expand;
  28. c s s s s s
  29. c c c c c c
  30. l l l l l l.
  31. Compact Disc Want List - \*(DY
  32. EOF
  33.  
  34. #
  35. # Let awk handle reformatting.
  36. #
  37. awk    'BEGIN    { FS = "\t" }
  38.         { printf "%s\t%s\t%s\t%s\t%s\t%s\n", $1, $2, $3, $4, $5, $6
  39.           if (NR == 1)
  40.             printf "=\n.TH\n"
  41.         }'
  42.  
  43. #
  44. # Put out troff footer.
  45. #
  46. cat << EOF
  47. .TE
  48. EOF
  49.