json-schema-validator/test/test-pipe-in.sh
Patrick Boettcher 940262ceae fix #93 by returning default-values for refs
and also return them for root-schemas
2020-03-26 10:49:58 +01:00

14 lines
219 B
Bash
Executable File

#!/bin/bash
# all argument are considered as a program to call (with its arguments),
# the last argument is read from stdin via '<'
set -e
arr=( "$@" )
input=${arr[-1]}
unset 'arr[${#arr[@]}-1]'
${arr[@]} < $input