Skip to content

Commit 663d189

Browse files
committed
prefix: compatibility tweaks
1 parent 2d5bbb9 commit 663d189

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prefix

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
# Prefix the output of a command with some given text.
44

55
if [ $# -lt 2 ]; then
6-
echo "Usage: $0 text command" >&2
7-
exit 1
6+
printf "Usage: %s text command\n" "$0" >&2
7+
exit 1
88
fi
99

1010
PREFIX=$1
1111
shift
1212

1313
$@ | while read line; do
14-
echo "${PREFIX}${line}"
14+
printf "%s%s\n" "${PREFIX}" "${line}"
1515
done
1616
exit ${PIPESTATUS[0]}

0 commit comments

Comments
 (0)