argtype 274 B

1234567891011121314
  1. : argtype lists all em mnemonics that have an argument type equal to
  2. : one of the letters specified in the argument
  3. case x$# in
  4. x2)
  5. ;;
  6. x*) echo "Usage: $0 argtypes <em_table>" 1>&2
  7. exit 1
  8. ;;
  9. esac
  10. ed -s $2 << A
  11. 1,/^\$/d
  12. 1,/^\$/d
  13. 1,/^\$/g/^\(...\) [$1].*/s//\\1/gp
  14. A