svn commit: r250575 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma
Mark Johnston
markj at FreeBSD.org
Sun May 12 16:29:10 UTC 2013
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=$?
More information about the svn-src-all
mailing list