diff options
author | David Wührer <def@raspberrypi> | 2019-10-13 13:25:14 +0200 |
---|---|---|
committer | David Wührer <def@raspberrypi> | 2019-10-13 13:25:14 +0200 |
commit | e60829f7b9c61dc870173a8dd8f2f85c17517ec4 (patch) | |
tree | e99f252f307b3a4e31df5ff45cf5daf6bccaf9f6 /reduce |
Initial commit
Diffstat (limited to 'reduce')
-rwxr-xr-x | reduce | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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")" "$@" |