summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* changelogHEADmasterJoey Hess2022-05-181-0/+7
|
* Use pclose() instead of fclose()Mikel Olasagasti Uranga2022-05-181-1/+1
| | | | | | | | | | | | | | | | | | The return value from popen() is a normal standard I/O stream in all respects save that it must be closed with pclose() rather than fclose(3). Solves the following warning when compiled with -Wmismatched-dealloc: errno.c: In function ‘search_all’: errno.c:126:5: warning: ‘fclose’ called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] 126 | fclose(f); | ^~~~~~~~~ errno.c:113:9: note: returned from ‘popen’ 113 | f = popen("locale -a", "r"); | ^~~~~~~~~~~~~~~~~~~~~~~
* releasing package moreutils version 0.670.67Joey Hess2021-12-212-6/+14
|
* ifne.1: Improve example that pipes to mail to avoid escape sequencesJoey Hess2021-09-282-1/+3
| | | | | | | | | | | As recently seen in fail2ban's security hole (CVE-2021-32749), piping user controlled input to mail is exploitable, since a line starting with "~! foo" in the input will run command foo. A core file named like that is not impossible, so guard against it in this example. Sponsored-by: Jack Hill on Patreon
* Makefile: Install man pages without executable bitJoey Hess2021-09-192-1/+8
| | | | Thanks, meator
* releasing package moreutils version 0.660.66Joey Hess2021-09-161-2/+2
|
* chronic: With -v, flush stdout after printing "STDERR" headerJoey Hess2021-09-162-1/+3
| | | | | | | | Since that header is output to stdout, make sure it is output before outputting the actual stderr, so the header does not appear after the stderr. Thanks to Adam Sjøgren for reporting the problem and making the patch.
* skip reading from stdin when it's a ttyJoey Hess2021-02-042-1/+12
| | | | | | vipe: When no output is piped into vipe, and stdin is connected to the terminal, don't read from stdin before opening the editor. This allows eg: vipe | command Thanks, Florian Pensec
* Add uninstall make recipeSpenser Truex2021-01-211-0/+4
| | | | | | I was thinking about using my package manager instead of managing the source myself, but that would have meant manually unlinking all the files!
* releasing package moreutils version 0.650.65Joey Hess2021-01-021-2/+2
|
* changelogJoey Hess2021-01-021-0/+3
|
* ifdata: fail when -ph is given but no hwaddr is available (Closes: #386755)Nicolas Schier2021-01-022-1/+11
| | | | | | | | | | Exit ifdata with an error code if '-ph' (print hardware address) is given but no hardware address is available for the given network device. Previously, ifdata printed the invalid hardware address 00:00:00:00:00:00 in such cases and exited as if this was the real hardware address. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* ifdata.docbook: fix a simple typoNicolas Schier2021-01-021-1/+1
| | | | | | abut -> about Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* changelogJoey Hess2020-11-191-0/+7
|
* add usage helpJoey Hess2020-11-191-1/+3
|
* Add argument --suffix to vipePål Grønås Drange2020-11-191-1/+18
| | | | | | Teaching vipe --suffix makes the underlying temporary file have a given file extension to enable editors to understand the context in which they are opened.
* releasing package moreutils version 0.640.64Joey Hess2020-08-291-2/+2
|
* changelogJoey Hess2020-08-201-0/+2
|
* fix compilation under uClibc-ngRosen Penev2020-08-201-1/+1
| | | | | | getloadavg is not implemented. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* changelogJoey Hess2020-03-261-0/+2
|
* fix iso date parsingDavid Laban2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | With this patch applied, you should be able to do: kubectl logs --timestamps | ts -r and receive relative timestamps in your output. --- Review by Joey: This fixes the year to have 4 digits, which seems obviously right. It also allows a trailing Z, for dates in UTC. Other dates already matched by this regexp can have time zones, and ts just ignores time zones and assumes it's in the local time zone. I don't know if that's really a good idea, but accepting "Z" does not open a new can of worms.
* changelogJoey Hess2019-11-291-0/+7
|
* parallel: fix typoNicolas Schier2019-11-291-1/+1
| | | | | | This patch fixes a minor typo in parallel.c, detected by lintian. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* is_utf8: allow propagation of compiler and linker flagsNicolas Schier2019-11-291-3/+3
| | | | | | | | Allow propagating compiler and linker flags via overrides of CFLAGS and LDFLAGS variables. This allows enabling of hardening flags w/o modification of the original Makefile. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* releasing package moreutils version 0.630.63Joey Hess2019-01-091-2/+2
|
* sponge: Fix bug in -a mode that doubled original content of fileJoey Hess2019-01-092-1/+3
| | | | | | | | Occurred when the temp file is located on a different filesystem. It seems that append mode was put in on that file open without realizing the consequences of it. Bug has been present since the first -a patch. This commit was sponsored by Peter on Patreon.
* ts: minor rewording of the manpageDima Kogan2018-12-311-5/+5
| | | | | | Previously cursory reading of the manpage suggested that the default format changes for -s only. But it actually changes for -s or -i, and the reworking makes that clear.
* changelogJoey Hess2018-12-311-0/+2
|
* ts -m now works even with hires formatsDima Kogan2018-12-311-3/+4
| | | | | I.e. 'ts -m %.s' now does reasonable things. There was a bug in the handling of the offset between the normal and hi-res clocks
* added -m to the ts manpageDima Kogan2018-12-281-1/+1
| | | | The -m option was already supported, but the manpage omitted it
* changelogJoey Hess2018-08-221-0/+7
|
* Set UNLINK=>1 in tempfile() to ensure cleanup if die() happensStig Palmquist2018-08-221-2/+1
|
* releasing package moreutils version 0.620.62Joey Hess2017-12-311-2/+2
|
* clean is_utf8 subdirJoey Hess2017-12-311-1/+2
|
* remove #define _BSD_SOURCEJoey Hess2017-12-311-1/+0
| | | | | | Compiler warning from this as it's deprecated. gcc suggested _DEFAULT_SOURCE, but I think that's on by default? It seems to compile ok without it.
* changelogJoey Hess2017-12-311-0/+10
|
* pee: remove buffering of input and outputs.Tilman Sauerbeck2017-12-311-2/+15
| | | | | Previously pee buffered the data processed which may cause unwanted delays. This change makes it so that data written to pee gets written out immediately.
* vidir: reword man page to more explicit mention 'file' args (Closes: #885221)Nicolas Schier2017-12-311-7/+8
| | | | | | | | | | As complained in #885221, the 'file' arguments were not described as much as it might be necessary. This patch attempts to reword the man page to cover the actual argument handling of vidir more completely. Thanks to Daniel Shahaf. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* chronic: document return value semantics of -e option (Closes: #867167)Nicolas Schier2017-12-311-0/+3
| | | | | | Thanks to Daniel Shahaf. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* pee: ignore SIGPIPE and write errors (Closes: #697052)Nicolas Schier2017-12-312-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without ignoring SIGPIPE, any command run by 'pee' that exits early will close the pipe to 'pee' and thus cause a SIGPIPE that terminates 'pee'. The more convinient (and possible less surprising) way is probably to simply ignore the SIGPIPE and let all other commands issued by 'pee' continue without any harm. The same argumentation goes for ignoring write errors, as any early exiting child of 'pee' is closing the pipe and thus causing a write error. With this patch examples like seq 100000 | pee 'head -n1' 'tail -n1' echo foo | pee cat 'echo bar' cat cat do output the expected lines, in contrast to seq 100000 | pee --no-ignore-sigpipe --no-ignore-write-errors 'head -n1' 'tail -n1' echo foo | pee --no-ignore-sigpipe --no-ignore-write-errors cat 'echo bar' cat cat . Thanks to Ole Jørgen Brønner. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
* ts: Added %.T format like %T but with hi-res.Joey Hess2017-11-272-5/+8
| | | | Thanks, Matt Koscica
* make -m start at current timeJoey Hess2017-10-311-3/+5
| | | | | | | The mono clock is relative to some arbitrary start time, which led to a display of a date typically close to the epoch. Fix that by getting the current time at startup, and applying the delta between that and the mono time.
* document -mJoey Hess2017-10-311-1/+8
|
* else indent style fixJoey Hess2017-10-301-4/+8
|
* ts: Introduce '-m' option to use CLOCK_MONOTONICBen Leinweber2017-10-301-4/+20
| | | | | | | | | | | The new '-m' option will retrieve the monotonic clock rather than the realtime clock. Sometimes it is required that the timer being used not change even when the user updates the system time. The monotonic clock guarantees a monotonically increasing time value which may not be adjusted. Signed-off-by: Ben Leinweber <bleinweb@gmail.com>
* Revert "ts: Introduce '-m' option to use CLOCK_MONOTONIC"Joey Hess2017-10-301-23/+6
| | | | | | This reverts commit d4592ac408f2086a3ed305c3fccf9107763e2be4. Seems he sent the wrong patch version
* ts: Add -m option to use monotonic clock. Thanks, Ben LeinweberJoey Hess2017-10-301-0/+7
|
* else indent style fixJoey Hess2017-10-301-3/+6
|
* ts: Introduce '-m' option to use CLOCK_MONOTONICBen Leinweber2017-10-301-4/+18
| | | | | | | | | | | The new '-m' option will retrieve the monotonic clock rather than the realtime clock. Sometimes it is required that the timer being used not change even when the user updates the system time. The monotonic clock guarantees a monotonically increasing time value which may not be adjusted. Signed-off-by: Ben Leinweber <bleinweb@gmail.com>
* releasing package moreutils version 0.610.61Joey Hess2017-04-191-2/+2
|