awk/testdir/t.arith
Arnold D. Robbins d6c466c367 Extract testdir.
2019-06-23 03:13:57 -06:00

7 lines
229 B
Plaintext

{ print NR, $1, $1+$1, $1-$1, $1 * $1 }
{ print NR, $1/NR, $1 % NR }
# { print NR, $1++, $1--, --$1, $1-- } # this depends on order of eval of args!
{ print NR, -$1 }
$1 > 0 { print NR, $1 ^ 0.5 }
$1 > 0 { print NR, $1 ** 0.5 }