diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2024-11-21 13:30:52 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2024-11-21 13:30:52 +0530 |
commit | 5c916d69d457101326803eb076a746060e3618cf (patch) | |
tree | d6fce3256eede1c1bf78fb6a1be75b9cc4b84cee /.local/bin/shorts/append-to-history |
Moved from github
Diffstat (limited to '.local/bin/shorts/append-to-history')
-rwxr-xr-x | .local/bin/shorts/append-to-history | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.local/bin/shorts/append-to-history b/.local/bin/shorts/append-to-history new file mode 100755 index 0000000..7d23dc8 --- /dev/null +++ b/.local/bin/shorts/append-to-history @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -n "$1" ] || exit +sed -i "\|^${1}$|d" "${2}" +echo "$1" >> "$2" |