diff options
author | EuAndreh <eu@euandre.org> | 2021-01-26 23:25:30 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-01-26 23:33:56 -0300 |
commit | 3ceb67074fc2fb64fced7beb3730f1666be7d537 (patch) | |
tree | 2e5ad415de2695bdca4007bf3eeadfb629a25461 | |
parent | remembering: Add -V version flag, add missing docs on -h flag (diff) | |
download | remembering-0.1.2.tar.gz (sig) remembering-0.1.2.tar.xz |
v0.1.2: Use sed over tac for POSIX compatibilityv0.1.2
TODOs.md: Mark #task-98478c0f-97ac-4667-acdc-9373e2841de9 as done
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | TODOs.md | 5 | ||||
-rwxr-xr-x | remembering | 5 |
4 files changed, 13 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a58444..7d109b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ ## Security --> +# 0.1.2 - 2021-01-26 +## Fixed +Replace usage of GNU Coreutils' specific `tac` utility with `sed`. + # 0.1.1 - 2021-01-26 ## Fixed Allow names with spaces. @@ -1,7 +1,7 @@ .POSIX: PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man -VERSION = v0.1.1 +VERSION = v0.1.2 DATE = 2021-01-26 all: @@ -1,12 +1,15 @@ # Tasks -## TODO Is tac POSIX {#task-98478c0f-97ac-4667-acdc-9373e2841de9} +## DONE Is tac POSIX {#task-98478c0f-97ac-4667-acdc-9373e2841de9} +- DONE in 2021-01-26 - TODO in 2021-01-26 --- If it isn't, what to replace it with? +With [sed](https://unix.stackexchange.com/questions/280685/reverse-sequence-of-a-file-with-posix-tools/280686#comment601716_280686). + ## DONE Add CHANGELOG.md for 0.1.0 {#task-f4258dc4-22aa-408d-a0b1-953f654e0623} - DONE in 2021-01-26 - TODO in 2021-01-24 diff --git a/remembering b/remembering index 0e3f29a..b7c23ae 100755 --- a/remembering +++ b/remembering @@ -79,9 +79,12 @@ FILTERED="$(mktemp)" SORTED_STDIN="$(mktemp)" cat | sort -u > "$SORTED_STDIN" +# sed line to reverse lines, replacing GNU/Linux's tac +# Taken from: +# https://unix.stackexchange.com/questions/280685/reverse-sequence-of-a-file-with-posix-tools/280686#comment601716_280686 xargs -I{} printf '0:%s\n' "{}" < "$SORTED_STDIN" | \ sort -t: -k2,2 -m - "$PROFILE" | \ - tac | \ + sed '1!x;H;1h;$!d;g' | \ sort -t: -k2,2 -u > "$MERGED" xargs -I{} printf 'filter_marker:%s\n' "{}" < "$SORTED_STDIN" | \ |