improvements:
- improve statuscode behaviour
- don't exit if a file in a series fails. exit 2 if an error occured
in a file series. don't exit if there is a read error (like: grep
input file is a directory).
- use agetline instead of agets().
with the simple test: time seq 1 100000000 | grep 'a'
its 12 seconds (from 24 seconds) on my machine.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This reverts commit d9a098ae6bc07188cbaefcd188e5911dec41815d.
Conflicts:
grep.c
Hiltjo Posthuma <hiltjo@codemadness.org> said:
(Re)compiling the regex for each line doesn't make sense (imho) and
slows it down a lot.
A simple test:
time seq 1 100000000 | grep 'a'
sbase grep (before patch):
0m22.21s real 0m0.00s user 0m0.00s system
sbase grep (after patch):
2m16.28s real 0m0.00s user 0m0.00s system
coreutils grep:
0m1.15s real 0m0.00s user 0m0.00s system
So the patch should be reverted I think.
NOTE: coreutils chown wont process file series further on error, but busybox does. For consistency among the other tools follow busybox behaviour.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
continue processing files if a chmod on a file in a series failed, but return with an error status code.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
- for octal input: reset mode to 0.
- take umask into account.
- make '=rwx' etc work.
- we wont support crazy but valid modes like "a+rw,g=x,o=g"
- uudecode: use parsemode, mask is 0.
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
Options that are specific to a single key definition are not
supported (e.g. "sort -k 2,3n -k 4,4"). Should you try to specify
such definitions, sort will return with EXIT_FAILURE and an error
message. Instead, all key definitions exclusively use the global
settings.
It always behaves like -b was set.
*sum tools: -c was added
tr: -d flag was added.
xargs: -n flag was added.
cmp: minor typo (change to lowercase).
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>