*
* See http://opengroup.org/onlinepubs/9699919799/utilities/head.html
-USE_HEAD(NEWTOY(head, "?n#<0=10", TOYFLAG_BIN))
+USE_HEAD(NEWTOY(head, "?n#<0=10", TOYFLAG_USR|TOYFLAG_BIN))
config HEAD
bool "head"
while (lines) {
len = read(fd, toybuf, size);
- if (len<0) perror_msg("%s",name);
+ if (len<0) perror_msg_raw(name);
if (len<1) break;
for(i=0; i<len;) if (toybuf[i++] == '\n' && !--lines) break;
if (arg && *arg == '-' && arg[1]) {
TT.lines = atolx(arg+1);
toys.optc--;
- }
+ } else arg = 0;
loopfiles(toys.optargs+!!arg, do_head);
}