From owner-freebsd-questions Wed Dec 4 00:49:46 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA19023 for questions-outgoing; Wed, 4 Dec 1996 00:49:46 -0800 (PST) Received: from public.jn.sd.cn (public.jn.sd.cn [202.102.128.111]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id AAA19015 for ; Wed, 4 Dec 1996 00:49:41 -0800 (PST) From: sln@public.jn.sd.cn Received: (from sln@localhost) by public.jn.sd.cn (8.6.11/8.6.11) id QAA02302; Wed, 4 Dec 1996 16:52:06 +0800 Date: Wed, 4 Dec 1996 16:52:06 +0800 (CST) To: questions@freebsd.org Subject: shell programming Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I want to calculate intergers under Bourne Shell, I input the following: a=10 a='expr $a+10' when I typed "echo $a", the result from system is "expr $a+1" just the same as I typed it in the command, but as the "expr' manul says, the result should be "20", what's the problem? Further more, I want to know a general way to do some calculation using variables under unix shell. Thanks in advance! Song