home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / LINUX / ARCHIVE / GETMAC.Z / GETMAC / sbin / getmac
Encoding:
Text File  |  1993-01-01  |  329 b   |  13 lines

  1. #!/bin/sh
  2. # Usage: getmac -package macro
  3. case $1 in
  4.  -mm) file="/usr/lib/macros/mmt";;
  5.  -ms) file="/usr/lib/tmac/tmac.s";;
  6.  -me) file="/usr/lib/tmac/tmac.e";;
  7.  -man) file="/usr/lib/tmac/tmac.an";;
  8. esac
  9. echo '.\"' 
  10. echo .\\\" The following definition of $mac was found in $file:
  11. echo '.\"'
  12. sed -n -e "/^\.de *$2/,/^\.\.$/p" $file
  13.