Mike Jeays wrote:
"man expr" to give the short answer to your first question:
As an example, x=`expr $x + 1`
536 ~ $ x=4
537 ~ $ x=`expr $x + 1`
538 ~ $ echo $
Note the back-quotes to execute a command and return the result, and the
need for spaces between each token in the expr command.
sh(1) is able to evaluate arithmetic expressions too, e.g.
x=$(($x+1))
Björn
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"