aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2023-01-21 01:46:30 -0500
committertdro <tdro@users.noreply.github.com>2023-01-21 01:46:30 -0500
commitbf1457bc3f090fefcf1b4eae701fd2ef4fd47bbb (patch)
tree72a7c3817420edcca3865c05b4c3da4d2fb0a4bc /.local
parent2ab1430f3fb660b3051f30ab01e86b18c1797722 (diff)
downloaddotfiles-bf1457bc3f090fefcf1b4eae701fd2ef4fd47bbb.tar.gz
dotfiles-bf1457bc3f090fefcf1b4eae701fd2ef4fd47bbb.tar.bz2
dotfiles-bf1457bc3f090fefcf1b4eae701fd2ef4fd47bbb.zip
.local/bin/bashhistory: Replace sponge with mv
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/bashhistory6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/bashhistory b/.local/bin/bashhistory
index bfaa122..73d8376 100755
--- a/.local/bin/bashhistory
+++ b/.local/bin/bashhistory
@@ -7,9 +7,9 @@ current="$HISTFILE"
lockfile='/tmp/bashhistory_Ri5ki9ei.lock'
_prune() {
- sed --in-place '/^#/d' "$1" && # Remove all timestamps.
- sed --in-place '/.........../!d' "$1" && # Remove all commands less than 11 characters.
- sort --unique "$1" | sponge "$1" # Remove all duplicate entries.
+ sed --in-place '/^#/d' "$1" && # Remove all timestamps.
+ sed --in-place '/.........../!d' "$1" && # Remove all commands less than 11 characters.
+ sort --unique "$1" > "$1.tmp" && mv --force "$1.tmp" "$1" # Remove all duplicate entries.
}
_migrate() {