Bourne shell question

The Ancient Programmer abrams at dan.ccd.bnl.gov
Thu May 9 05:26:23 AEST 1991


	How does one do a simple computation in a shell script?
The c-shell does it very neatly. 
Running:
	#!/bin/csh
	set a = 10
	set b = 1
	@ c = $a - $b
	echo "a=$a, b=$b, c=$c"

produces: a=10, b=1, c=9

but I've been unable to find out how to do this in the bourne shell.

Any help will be greatly appreciated.  

--
INTERNET:  abrams at bnl.gov               |/ |    ^
BITNET:    abrams at bnlux0.BITNET         |\ |__ /-\



More information about the Comp.unix.questions mailing list