Montag, 4. April 2011

Shell 004: Arithmetic Extension

Sometimes it is useful to have an arithmetic extension available in the BaSH. In its most primitive form this could look something like

mzh @ ~/shell $ for i in {1,2,3}
> do
> tmp=$((i*i))
> echo $tmp
> done
1
4
9

I found it here.

Keine Kommentare:

Kommentar veröffentlichen