[Toybox] [PATCH] head: add --bytes synonym for -c.
enh
enh at google.com
Tue Nov 27 17:08:56 PST 2018
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.
---
toys/posix/head.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toys/posix/head.c b/toys/posix/head.c
index 0cec403..7e34a71 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"
--
2.20.0.rc0.387.gc7a69e6b6c-goog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-head-add-bytes-synonym-for-c.patch
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20181127/235ab429/attachment-0002.bin>
More information about the Toybox
mailing list