aben20807 / blog-post-issues

https://aben20807.github.io/
MIT License
9 stars 2 forks source link

bashmarks issue #36

Open aben20807 opened 5 years ago

aben20807 commented 5 years ago
bash: /tmp/bashmarks.gnc3m4: cannot overwrite existing file

https://github.com/ohmybash/oh-my-bash/issues/50

$ vim ~/.oh-my-bash/plugins/bashmarks/bashmarks.plugin.sh
     # purge line
-    sed "/$2/d" "$1" > "$t"
+    sed "/$2/d" "$1" >| "$t"
     /bin/mv "$t" "$1"
aben20807 commented 5 years ago

set -C 或是 『-o noclobber』