diff options
Diffstat (limited to 'bin/hlp/absln')
-rwxr-xr-x | bin/hlp/absln | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/hlp/absln b/bin/hlp/absln new file mode 100755 index 0000000..be195a9 --- /dev/null +++ b/bin/hlp/absln @@ -0,0 +1,17 @@ +#!/bin/sh + +# absln -- convert to absolute line + +test $# -ne 1 && { echo "usage: $0 line" 1>&2; exit 1; } +case "$1" in +'+'*) + test -z "${1#+}" && term=1 || term=${1#+} + expr `cat $EFP/line` + $term ;; +'-'*) + test -z "${1#-}" && term=1 || term=${1#-} + expr `cat $EFP/line` - $term ;; +.) + cat $EFP/line ;; +*) + echo "$1" ;; +esac |