[hacknews] new shell with expr

david@utzoo.UUCP (David Trueman) (07/04/85)

We are now running a new version of the shell (sh(1)) with the expr(1) 
utility built in.  This provides the shell with fast integer arithmetic,
and string manipuation based on regular expressions.  At the same time,
I documented several existing but undocumented expr operators:  substr,
length, index and match (see expr(1) for details).

Expr's behaviour should be unchanged with two exceptions:  error messages
are prefixed with `expr: ' as is conventional for most commands and the
arithmetic and relational operators now accept negative numbers.

These new features cost about 7k in code space, but very careful use of data
space kept that increase to about 300 bytes, so the performance of programs
using the shell but not expr should not be impacted significantly.  Shell
programs using expr will, of course, be substantially faster.
-- 
				David Trueman @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!david