Arithmetic/Integer: Difference between revisions

Content added Content deleted
m (→‎{{header|Efene}}: whitespace)
(The ash shell does not have arithmetic expansion)
Line 1,557: Line 1,557:


{{works with|Bourne shell}}
{{works with|Bourne shell}}
{{works with|Almquist SHell}}
<lang bash>#!/bin/sh
<lang sh>#!/bin/sh
read a; read b;
read a; read b;
echo "a+b = " `expr $a + $b`
echo "a+b = " `expr $a + $b`
Line 1,569: Line 1,570:
With SUSv3 parameter expansions:
With SUSv3 parameter expansions:


{{works with|Almquist SHell}}
{{works with|Bourne Again SHell|3.2}}
{{works with|Bourne Again SHell|3.2}}
{{works with|Korn SHell|5.2.14}}
{{works with|Korn SHell|5.2.14}}