mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
tests: init.sh: use "sed 1q" in place of "head -1"
* tests/init.sh (warn_): Use "sed 1q" in place of "head -1". The latter is officially obsolete but more portable than "head -n1". Reported by Bernhard Voelker.
This commit is contained in:
1 parent
ea7c77df7f
commit
1d919fbb7f
1 file changed
+1
-1
+1
-1
@@ -84,7 +84,7 @@ warn_ ()
|
||||
case $IFS in
|
||||
' '*) printf '%s\n' "$*" >&2
|
||||
test $stderr_fileno_ = 2 \
|
||||
|| { printf '%s\n' "$*" | head -1 >&$stderr_fileno_ ; } ;;
|
||||
|| { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;;
|
||||
*) (IFS=' '; warn_ "$@");;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user