Commit Graph

125 Commits

Author SHA1 Message Date
Tai Chi Minh Ralph Eastwood
0eaff8b7fe Update README for ls -R 2015-02-21 11:46:04 +00:00
sin
9c30fbf018 Add ls -A implementation
Thanks joshua@cubesolving.com!
2015-02-21 09:31:01 +00:00
Evan Gates
3751dd546f no need for libutf in test, a null byte is a null byte 2015-02-20 19:29:28 +00:00
sin
cd51795423 Implement nl -n format 2015-02-20 14:12:48 +00:00
sin
9de3546082 Implement nl -w width 2015-02-20 12:15:43 +00:00
sin
13e4231f4c Implement nl -v startnum 2015-02-20 12:05:54 +00:00
Evan Gates
76e6aacd60 Add initial find(1) implementation
No manpage yet.
2015-02-20 10:17:16 +00:00
Quentin Rameau
51b707e91e ls: add support for -p 2015-02-19 18:52:13 +00:00
FRIGN
b00a00703f Add proper d- and t-flag support to touch(1)
except the [,frac], [.frac] respectively, but that's ok.
2015-02-19 18:54:56 +01:00
sin
737e805505 touch -t is also unwanted 2015-02-19 15:28:05 +00:00
sin
32791d3ca7 Mark touch -d as unwanted in the README 2015-02-19 15:27:03 +00:00
Quentin Rameau
bf5f6a08a4 README: added options for date, ls, touch 2015-02-19 14:45:13 +00:00
sin
2137dfa334 Mark du(1) as finished in README 2015-02-18 20:43:46 +00:00
sin
14b95b5f53 Mark du -x as done in the README 2015-02-18 20:41:37 +00:00
sin
2a3f82a5cd Implement -u support for ls(1) 2015-02-18 16:29:46 +00:00
FRIGN
6b719faade Add q-flag to ls(1)
of course, UTF-8-aware. ;)
2015-02-17 18:59:01 +01:00
FRIGN
e5b5497773 Add UTF-8-support to strings(1), add t-flag and refactor code
Previously, the string-length was limited to BUFSIZ, which is an
obvious deficiency.
Now the buffer only needs to be as long as the user specifies the
minimal string length.
I added UTF-8-support, because that's how POSIX wants it and there
are cases where you need this. It doesn't add ELF-barf compared to
the previous implementation.
The t-flag is also pretty important for POSIX-compliance, so I added
it.
The only trouble previously was the a-flag, but given that POSIX
leaves undefined what the a-flag actually does, we set it as default
and don't care about parsing ELF-headers, which has already
turned out to be a security issue in GNU coreutils[0].

[0]: http://lcamtuf.blogspot.ro/2014/10/psa-dont-run-strings-on-untrusted-files.html
2015-02-17 17:04:36 +01:00
sin
d8a89002d3 strings: Add -n len support 2015-02-17 13:46:48 +00:00
sin
8ce6d7091a strings: Default to -a 2015-02-17 13:40:36 +00:00
Tai Chi Minh Ralph Eastwood
7a5c4e3a29 Update README for chown, chgrp -H -L -P 2015-02-16 15:54:00 +00:00
FRIGN
bafd41e1cf Add printf(1)
This is a particularly interesting program.
I managed to implement everything according to POSIX except how
octal escapes are specified in the standard, which is yet another
format compared to the one demanded for tr(1).
This not only confuses people, it also adds unnecessary cruft
for no real gain.
So in order to be able to use unescape() easily and for consistency,
I used our initial format \o[oo] instead of \0[ooo].

Marked as optional is UTF-8 support for %c in the POSIX specification.
Given how well-developed libutf has become, doing this here was more
or less trivial, putting us yet again ahead of the competition.
2015-02-15 14:46:58 +01:00
sin
9f1f8d5dd8 Update uuencode manpage and mark as complete in README 2015-02-13 11:38:52 +00:00
sin
e8cd6947ec Update uudecode manpage and mark as complete 2015-02-13 11:30:55 +00:00
sin
c4e951366f Update README for uudecode and uuencode 2015-02-13 11:21:52 +00:00
FRIGN
93d0178852 uudecode(1) also needs the m-flag 2015-02-13 10:12:16 +01:00
FRIGN
066540b3c5 Update README with chgrp(1) and chown(1) status 2015-02-12 23:35:24 +01:00
sin
4888bae455 uniq: Add standards section to manpage and update README 2015-02-11 15:55:58 +00:00
sin
2e5a02dd26 uniq is now complete, update README 2015-02-11 15:27:19 +00:00
sin
5f06185b1b uniq: Fixup program usage and manpage
Remove -i as it is not required by POSIX.  We'll add it if we
hit scripts that require it.
2015-02-11 12:19:38 +00:00
sin
a29d31e94b Update readlink in README 2015-02-11 11:54:58 +00:00
sin
aed987a9af Update README 2015-02-11 10:57:00 +00:00
FRIGN
1c6298103e Fix alphabetical order in README 2015-02-10 12:11:21 +01:00
Evan Gates
bc07f1b9b5 Add initial implementation of sed(1)
No manpage yet.
2015-02-10 10:35:22 +00:00
FRIGN
7143737b50 Update README reflecting recent changes to the codebase 2015-02-10 00:53:48 +01:00
FRIGN
360a63769c Use strtonum and libutf in test(1), refactor code and manpage
and mark it as finished in README.
2015-02-09 22:21:23 +01:00
FRIGN
006c9739b3 Add c-flag to tail(1) and refactor manpage
and mark it as finished in README.
2015-02-09 18:38:41 +01:00
FRIGN
a5cc60f2e0 Refactor tail(1) manpage and update README
It's not finished yet. We still need the c-flag.
2015-02-09 16:26:17 +01:00
FRIGN
d6b3890af6 Add r-flag to touch(1), refactor manpage and code
and mark it as finished in README.
2015-02-09 00:41:57 +01:00
FRIGN
49ed53b46c Reformat README 2015-02-09 00:20:33 +01:00
FRIGN
5699d5fb64 Refactor tar(1) manpage
and mark it as finished in the README.
Specifically, add a small section on the compression flags, which
are basically an infected GNU limb which should be removed from
the face of the earth as soon as possible.
2015-02-08 23:16:27 +01:00
FRIGN
1df65f4af4 Refactor sponge(1) code and manpage
and mark it as finished in README.
2015-02-08 22:17:21 +01:00
FRIGN
3e7c549862 Refactor sync(1) code and manpage
and mark it as finished in README.
2015-02-08 22:08:14 +01:00
FRIGN
e01469c9a2 Refactor unlink(1) code and manpage
Remove superfluous stdlib.h-include.
2015-02-08 21:59:59 +01:00
FRIGN
1513c2b766 Refactor unexpand(1) code and manpage, adding tablist support
as already seen for expand(1), only twice as complicated.
2015-02-08 21:24:22 +01:00
FRIGN
28b4b25076 Refactor uname(1) code and manpage
remove stdlib.h-include which was there for no reason and clear
up the manpage.
2015-02-07 22:15:56 +01:00
FRIGN
018d60c6bf Refactor tty(1) code and manpage 2015-02-07 22:00:28 +01:00
FRIGN
79e45395e5 Refactor cmp(1) code and manpage
The algorithm had some areas which had potential for improvement.
This should make cmp(1) faster.
There have been changes to behaviour as well:

1) If argv[0] and argv[1] are the same, cmp(1) returns Same.
2) POSIX specifies the format of the difference-message to be:
      "%s %s differ: char %d, line %d\n", file1, file2,
      <byte number>, <line number>
   However, as cmp(1) operates on bytes, not characters, I changed
   it to
      "%s %s differ: byte %d, line %d\n", file1, file2,
      <byte number>, <line number>
   This is one example where the standard just keeps the old format
   for backwards-compatibility. As this is harmful, this change
   makes sense in the sense of consistentcy (and because we take
   the difference of char and byte very seriously in sbase, as
   opposed to GNU coreutils).

The manpage has been annotated, reflecting the second change, and
sections shortened where possible.
Thus I marked cmp(1) as finished in README.
2015-02-07 21:05:33 +01:00
Hiltjo Posthuma
949f930280 split: fixes
- -b argument required, don't allow -b <= 0.
- -l argument required, don't allow -l <= 0.
- usage() and argument parsing: sort flags.
- don't write 0 size file, get rid of goto reproducable with:
  printf 'a' | split -b 1.
- close FILE *in if != stdin.
- mark split as finished in README.
- codestyle fixes.
2015-02-01 16:30:12 +01:00
FRIGN
8ab096d2a4 Finish up wc(1)
Use size_t for all counts, fix the manpage and refactor the code.
Here's yet another place where GNU coreutils fail:

sbase:
$ echo "GNU/Turd sucks" | wc -cm
    15

coreutils:
$ echo "GNU/Turd sucks" | wc -cm
     15      15

Take a bloody guess which behaviour is correct[0].

[0]: http://pubs.opengroup.org/onlinepubs/009604499/utilities/wc.html
2015-02-01 03:01:11 +01:00
sin
d75cc2e556 POSIX doesn't specify yes(1) so mark it as such in README 2015-02-01 01:27:44 +00:00