#!/bin/sh set -eu usage() { cat <<-'EOF' Usage: pre PREFIX < STDIN EOF } PREFIX="${1:-}" eval "$(assert-arg -- "$PREFIX" 'PREFIX')" # FIXME: using "while" so we avoid GNU sed's buffering while read -r line; do printf '%s: %s\n' "$PREFIX" "$line" done