From e60829f7b9c61dc870173a8dd8f2f85c17517ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20W=C3=BChrer?= Date: Sun, 13 Oct 2019 13:25:14 +0200 Subject: Initial commit --- reduce | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 reduce (limited to 'reduce') diff --git a/reduce b/reduce new file mode 100755 index 0000000..2e7269c --- /dev/null +++ b/reduce @@ -0,0 +1,9 @@ +#!/bin/bash + +fn=$1 +f() { eval "$fn $*"; } +a=$2 +b=$3 +shift 3 +[[ -z "$b" ]] && exec echo "$a" +exec "$0" "$fn" "$(f "$a" "$b")" "$@" -- cgit v1.2.3