#!/bin/sh set -eu eval "$(args prefix configstatus -- "$@")" # We want to die with an error if the grep fails, so we can't use a # pipe: the exit status of a pipeline is the status of the last # command. line="$(grep '^s%@prefix@%.*%g$' $configstatus)" echo "$line" | sed -e 's/^.*%.*%\(.*\)%.*$/\1/'