slitaz-base-files view rootfs/usr/bin/calc @ rev 233

/usr/bin/slitaz: small improvment
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 13 01:36:45 2014 +0200 (2014-04-13)
parents da9e6fb03e1d
children
line source
1 #!/bin/sh
2 #
3 # Small cmdline AWK calculator.
4 # Copyright (C) 2014 SliTaz GNU/Linux.
5 #
7 case "$1" in
8 *[0-9]*)
9 awk "BEGIN{ print $* }" ;;
10 *)
11 name=$(basename $0)
12 echo -e "\nUsage: $name [0-9][+-*/][0-9]"
13 echo -e "Example: $name '(36*12)+7'\n" ;;
14 esac
15 exit 0