From b4ce54fc61e7c76e2d7f47c34733f0f0bbb6c4cd Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 12 Mar 2008 17:34:34 -0400 Subject: remove use of "tail -n 1" and "tail -1" The "-n" syntax is not supported by System V versions of tail (which prefer "tail -1"). Unfortunately "tail -1" is not actually POSIX. We had some of both forms in our scripts. Since neither form works everywhere, this patch replaces both with the equivalent sed invocation: sed -ne '$p' Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- git-am.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index 1f6b5e02c5..ac5c388060 100755 --- a/git-am.sh +++ b/git-am.sh @@ -357,7 +357,7 @@ do LAST_SIGNED_OFF_BY=` sed -ne '/^Signed-off-by: /p' \ "$dotest/msg-clean" | - tail -n 1 + sed -ne '$p' ` ADD_SIGNOFF=` test "$LAST_SIGNED_OFF_BY" = "$SIGNOFF" || { -- cgit v1.2.3