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
From 87b210b90b3f4a35d0e5a6289e85ee093f005529 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <e...@google.com>
Date: Mon, 26 Nov 2018 13:40:00 -0800
Subject: [PATCH] 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.
---
 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

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to