Heather
f47fafb28d
Merge pull request #830 from lucaotta/fix-788
...
Fix #788
2016-05-01 00:41:15 +04:00
Heather
57693af48d
Merge pull request #871 from modelorganism/odupdate
...
add functionality to od
2016-05-01 00:34:24 +04:00
modelorganism
3f356a4190
od: take input from stdin, as well as files.
2016-04-26 23:17:00 -05:00
modelorganism
e6cf167d1d
od: Accept multiple files names as input
2016-04-25 21:55:34 -05:00
modelorganism
1fbda9663d
Add extra spaces to output to match formating of origial od
2016-04-25 21:47:24 -05:00
Mike Swanson
c946202094
hashsum: add support for SHA-3 functions
...
Only the fixed output-size functions are supported, SHAKE128 and
SHAKE256 are not included for now.
2016-04-16 06:17:15 -07:00
Michael Gehring
77d1c309cd
od: fix infinite loop at EOF
...
Fixes #866
2016-04-15 07:41:03 +02:00
Nick Fitzgerald
3972c6eb53
tail: Clean up and test suffix multiplier
...
Makes `parse_size` return a `Result` where the `Err` part indicates whether
there was a parsing error, or the parse size is too big to store. Also makes the
value parsed a `u64` rather than a `usize`.
Adds unit tests for `parse_size` and integration tests using the suffix
multiplier in a number passed with the `-n` flag.
2016-04-02 14:16:11 -07:00
Valentin Lorentz
2fd7164cda
tail: Implement tail -z.
...
This options makes tail use NULL instead of newline as a line
delimiter.
2016-04-02 12:32:33 +02:00
Luca Ottaviano
6ded76714b
chmod: remove unused dependencies
2016-04-02 10:29:57 +02:00
Luca Ottaviano
2686ea75d7
chmod: handle -octal and -[rwx]
...
The main issue is that -octal or -[rwx] is interpreted as an option by
getopts.
Search the args for such a pattern, remove it before parsing and
manually handle it afterwards.
Fixes #788 .
2016-04-02 10:29:57 +02:00
Nick Fitzgerald
2b2c2b64c2
tail: When tailing a file in bytes mode, seek directly to the specified byte
...
When tailing a file, as opposed to stdin, and we are tailing bytes rather than
lines, we can seek the requested number of bytes from the end of the file. This
side steps the whole `backwards_thru_file` file loop and blocks of reads.
Fixes #833 .
2016-03-27 14:34:58 -07:00
Nick Fitzgerald
f851611001
tail: Pre-fill the buffer with zeroes
...
Rather than fill the buffer on every file read iteration, pre-fill it with
zeroes once at initialization time.
2016-03-27 14:34:58 -07:00
Joseph Crail
491320747b
sort: remove explicit enum values
2016-03-25 16:55:58 -04:00
Joseph Crail
2cdccb10bb
sort: fix whitespace and spelling
2016-03-25 16:55:58 -04:00
Joseph Crail
cc63565051
sort: add month sort
2016-03-25 16:55:58 -04:00
Joseph Crail
678a3d1451
sort: fix flag for human numeric sort
2016-03-25 16:55:50 -04:00
Joseph Crail
6488f168fb
sort: refactor settings into dedicated struct
2016-03-25 16:51:39 -04:00
Andre Bogus
986c00cd91
fix two clippy warnings
2016-03-24 12:15:01 +01:00
Shiroy
c8ff895018
Add missing lib.name for uucore
...
Fix build on Linux
2016-03-23 08:44:09 +01:00
Alex Lyon
94b8f9fe37
Merge pull request #836 from jamwt/fix_sleep
...
Fix sleep duration calculations.
2016-03-22 18:00:18 -07:00
Florian Gilcher
0be3e61d9f
Avoid using char() in tr
2016-03-22 22:03:06 +01:00
Florian Gilcher
2befeef179
Remove use of str_char in fmt
2016-03-22 21:57:52 +01:00
Jamie Turner
7d89717d4b
Fix sleep duration calculations.
...
Durations longer than ~4s were overflowing u32 and just.. not working.
2016-03-22 13:00:01 -07:00
Florian Gilcher
509d6efc78
Remove rustc_unicode dependency
2016-03-22 19:56:14 +01:00
Nick Fitzgerald
56d16ca7e7
tail: Optimize tail for bounded searches in files
...
When tail'ing a file, we do not need to read the whole file from start to finish
just to find the last n lines or bytes. Instead, we can seek to the end of the
file, and then read the file "backwards" in chunks until we find the location of
the first line/byte we wish to print. This ends up being a nice performance win
for very large files.
Fixes #764
2016-03-21 07:51:38 -07:00
Nick Fitzgerald
977742f209
tail: Take ownership of the provided BufReader<T>
...
The `BufReader` argument passed to the `fn tail<T: Read>(&mut BufReader<T>,
settings: &settings)` function is never reused, so the `tail` function should
just take ownership of it.
2016-03-21 07:51:32 -07:00
Luca Ottaviano
5dc0a55630
chmod: fix reference option
...
Reference option must have a file path.
Fix C interface using CString.
Better error message if the file doesn't exist.
2016-03-10 20:34:49 +01:00
Heather
8d278913c2
Merge pull request #825 from nathanross/dirname-fix-impl
...
Dirname: fix windows' failing test for absolute-path behavior (approach 2/2: platform-independent behavior)
2016-03-01 11:55:54 +04:00
Chirag B. Jadwani
d674a3bb63
uniq: minor refactoring in skip_fields
2016-02-29 11:16:58 +05:30
Chirag B. Jadwani
fc5b798ff1
uniq: fix skip & check characters logic
2016-02-29 11:10:38 +05:30
Andrew Eikum
d25ab4adc1
sort: Implement -o switch
2016-02-21 13:32:42 -06:00
Nathan Ross
3e6ac628bc
link: normalize file-not-found error message across platforms
2016-02-20 17:32:15 -05:00
Nathan Ross
51d7227aeb
dirname: in impl, make behavior for '/' fs root agnostic of host platform
2016-02-19 20:10:41 -05:00
Nathan Ross
a4e1372451
cat: squeeze blank keeps up to one blank line
2016-02-16 18:52:51 -05:00
Nathan Ross
c8dcdf7d25
basename: too few or many args messages go to stderr
2016-02-15 20:44:50 -05:00
Nathan Ross
5f88dfe12b
printf: rustfmt pass
2016-02-15 00:48:08 -05:00
Nathan Ross
9242ba1db6
printf: scaffolding for C99 hex float
2016-02-15 00:17:11 -05:00
Nathan Ross
0892ad3cde
printf: add (spare C99 hex floats)
2016-02-15 00:10:30 -05:00
Joseph Crail
53c60e2990
Fix type mismatch error.
2016-01-22 22:02:10 -05:00
Arcterus
0d3cc86936
uucore: don't follow symlinks when examining them ( fixes #799 )
2016-01-10 03:39:31 -08:00
Arcterus
d9ad0b185a
tests: fix tests that were failing on OS X
2016-01-10 00:09:05 -08:00
Heather
27c77db122
Merge pull request #795 from ebfe/ptx-stable
...
ptx: fix build on stable
2016-01-06 19:56:14 +04:00
Michael Gehring
26280d9083
expand, unexpand: fix build on stable
2016-01-06 16:35:33 +01:00
Michael Gehring
9cd7d03eff
ptx: fix build on stable
2016-01-06 16:20:59 +01:00
Alex Lyon
027e02db8b
Merge pull request #793 from ebfe/clippy
...
Fix clippy warnings
2016-01-06 00:56:07 -08:00
Michael Gehring
a2944e06db
Fix clippy warnings
2016-01-06 09:36:20 +01:00
Arcterus
bc40f93f7e
chmod: implement --verbose, --changes, and --quiet
2016-01-05 14:08:24 -08:00
Arcterus
ee669ab55b
chmod: rewrite mode parser
2016-01-04 20:00:34 -08:00
Michael Gehring
73cd23ca71
Merge pull request #781 from KeenS/mktemp
...
Mktemp
2016-01-04 18:40:08 +01:00