aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-11-26 13:40:00 -0800
committerRob Landley <rob@landley.net>2018-11-28 11:28:46 -0600
commita24b0dd59e2e968deb9cc229eab0d0c3e1f1c9e9 (patch)
tree2874bfee7c5b866e29528f218b45cc0f378d97b6 /toys/posix
parent9c8d2169ea07d828dbbbabb5fbc90b71f43bd9a3 (diff)
downloadtoybox-a24b0dd59e2e968deb9cc229eab0d0c3e1f1c9e9.tar.gz
head: add --bytes synonym for -c.
Used by OTA package scripts in AOSP, and quite widely inside Google. I've also added --lines because it seems crazy to support one and not the other, and --lines is also widly used inside Google too.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/head.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/head.c b/toys/posix/head.c
index 0cec4033..7e34a714 100644
--- a/toys/posix/head.c
+++ b/toys/posix/head.c
@@ -6,7 +6,7 @@
*
* Deviations from posix: -c
-USE_HEAD(NEWTOY(head, "?n#<0=10c#<0qv[-nc]", TOYFLAG_USR|TOYFLAG_BIN))
+USE_HEAD(NEWTOY(head, "?n(lines)#<0=10c(bytes)#<0qv[-nc]", TOYFLAG_USR|TOYFLAG_BIN))
config HEAD
bool "head"