Date: Sun, 12 May 2013 16:29:09 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250575 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma Message-ID: <201305121629.r4CGT9uT078490@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun May 12 16:29:09 2013 New Revision: 250575 URL: http://svnweb.freebsd.org/changeset/base/250575 Log: head -n doesn't take negative arguments on FreeBSD, so instead use sed '$d' to remove the last line of a file. Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh Sun May 12 16:26:33 2013 (r250574) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh Sun May 12 16:29:09 2013 (r250575) @@ -73,8 +73,8 @@ if [ "$status" -ne 0 ]; then fi # dtrace outputs a blank line at the end, which will sort to the beginning, -# so use head to remove the blank line. -head -n -1 $file > $file.2 +# so use sed to remove the blank line. +sed '$d' $file > $file.2 sort -n $file.2 | diff $file.2 - status=$? Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh Sun May 12 16:26:33 2013 (r250574) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh Sun May 12 16:29:09 2013 (r250575) @@ -89,8 +89,8 @@ if [ "$status" -ne 0 ]; then fi # dtrace outputs a blank line at the end, which will sort to the beginning, -# so use grep to remove the blank line. -head -n -1 $file > $file.2 +# so use sed to remove the blank line. +sed '$d' $file > $file.2 sort -n $file.2 | diff $file.2 - status=$?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305121629.r4CGT9uT078490>