Switched to shellscript
(less overhead overall)
This commit is contained in:
10
shellmath.sh
Normal file
10
shellmath.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
# Shellmath v2
|
||||
# Works in most bourne-type shells.
|
||||
# Partially reimplemented in shell script due to less overhead.
|
||||
|
||||
function add { echo $(($1+$2)); }
|
||||
function sub { echo $(($1-$2)); }
|
||||
function mul { echo $(($1*$2)); }
|
||||
function div { echo $(($1/$2)); }
|
||||
function mdl { echo $(($1%$2)); }
|
||||
function randr { echo $(($1+$RANDOM%$2)); }
|
||||
Reference in New Issue
Block a user