home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / expr.zip / READ.ME < prev   
Text File  |  1990-04-21  |  2KB  |  30 lines

  1.                 I've been running a lot of shell scripts lately. One construct
  2. commonly used in many scripts is the colon operator of /usr/bin/expr,
  3. which does regular expression matching. The Minix version of expr(1)
  4. doesn't support this operator at all, and had problems with its support
  5. of the rest.
  6.  
  7.         Here is my replacement version. It implements everything
  8. described in the V7 manual page, and behaves exactly as the 4.3BSD
  9. version does.  (I don't think this program has changed any since V7 -
  10. it would have broken a lot of scripts.) It also passes lint, and
  11. contains no cholesterol or artificial coloring.
  12.  
  13.         The regular expression code is my own, as it was not possible
  14. to use any of the commonly available regular expression matching
  15. libraries.  (expr(1) uses the ed(1) regexp syntax, while the libraries
  16. implement extensions or improvements. The extraction operator also
  17. would be difficult to get right if another library were used.) It
  18. passes a modified version of Henry Spencer's regular expression test,
  19. tailored for the BSD expr. There is one extension over the original
  20. version - multiple \(...\) pairs are allowed. Don't use this feature
  21. if you expect your scripts to work on V7/BSD/SysV. (The only reason
  22. this feature has been addded is that I had done the design and part of
  23. the coding work before I realized it was nonstandard. It seemed a
  24. shame to rip out perfectly good code that increased the generality,
  25. didn't hurt anything and didn't add significantly to the size.)
  26.  
  27. Bug reports appreciated.
  28.  
  29. -Peter S. Housel-       housel@ecn.purdue.edu           ...!pur-ee!housel
  30.