Skip to content

Commit

Permalink
added the /bin/ prefix for rm and mv, because those two are oft…
Browse files Browse the repository at this point in the history
…en aliased in many configurations
  • Loading branch information
w9 committed Jul 22, 2015
1 parent ade4ee2 commit 1431b18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bashmarks.sh
Expand Up @@ -144,14 +144,14 @@ function _purge_line {
if [ -s "$1" ]; then
# safely create a temp file
t=$(mktemp -t bashmarks.XXXXXX) || exit 1
trap "rm -f -- '$t'" EXIT
trap "/bin/rm -f -- '$t'" EXIT

# purge line
sed "/$2/d" "$1" > "$t"
mv "$t" "$1"
/bin/mv "$t" "$1"

# cleanup temp file
rm -f -- "$t"
/bin/rm -f -- "$t"
trap - EXIT
fi
}
Expand Down

0 comments on commit 1431b18

Please sign in to comment.