KIEKjes Upload System
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
365 B

#!/bin/sh
set -e
usage() {
echo "usage: $0 [-h] [CMD...]" >&2
}
while getopts h opt; do
case "$opt" in
h) usage; exit 0;;
?) usage; exit 255;;
esac
done
shift $(($OPTIND-1))
while read -r line; do
for cmd; do
read -r value
line="$(printf "%s\n%s\n" "$value" "$line" | eval "$cmd")"
done
printf "%s\n" "$line"
done