After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726908 - head -n -1 is not portable
head -n -1 is not portable
Product: vala
Classification: Core
Component: general
Other FreeBSD
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Reported: 2014-03-23 05:39 UTC by Ting-Wei Lan
Modified: 2014-03-23 22:19 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Ting-Wei Lan 2014-03-23 05:39:43 UTC
head -n -1 is used in function sourceend in tests/, but POSIX says the number should be a positive decimal integer. Using -1 cause the following error on FreeBSD:

head: illegal line count -- -1
Comment 1 Luca Bruno 2014-03-23 11:46:01 UTC
Does sed '$d' work?
Comment 2 Ting-Wei Lan 2014-03-23 15:57:37 UTC
Yes, it works.
Comment 3 Luca Bruno 2014-03-23 22:19:00 UTC
commit 02b3917f515c48be72fecdda52b3f84eea2358d5
Author: Luca Bruno <>
Date:   Sun Mar 23 23:18:06 2014 +0100

    tests: Use sed '$d' because head -n -1 is not portable
    Fixes bug 726908

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.