head -n doesn't take negative arguments on FreeBSD, so instead use sed '$d'
to remove the last line of a file.
This commit is contained in:
parent
09e6105ff4
commit
d02e5a206d
@ -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=$?
|
||||
|
@ -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=$?
|
||||
|
Loading…
Reference in New Issue
Block a user