diff options
author | markj <markj@FreeBSD.org> | 2013-05-12 16:29:09 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-05-12 16:29:09 +0000 |
commit | 08da0b8fad46087c0267f23830241099ae459fa5 (patch) | |
tree | afa9df872cd6c0deda7af73f55af9e5914f2d8ec /cddl | |
parent | 8f40d761c17b416a0ae225d630d4b7eeaf84ca6a (diff) | |
download | FreeBSD-src-08da0b8fad46087c0267f23830241099ae459fa5.zip FreeBSD-src-08da0b8fad46087c0267f23830241099ae459fa5.tar.gz |
head -n doesn't take negative arguments on FreeBSD, so instead use sed '$d'
to remove the last line of a file.
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh | 4 | ||||
-rw-r--r-- | cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh index 9a0aed0..f09c71f 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh @@ -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=$? diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh index 4e8d592..05b078a 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh @@ -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=$? |