dotfiles/.local/bin/bak

3 lines
85 B
Plaintext
Raw Normal View History

#!/bin/sh
test -f "$1.bak" && (mv "$1" /tmp && mv "$1.bak" "$1") || mv "$1" "$1.bak"