3 lines
143 B
Bash
Executable file
3 lines
143 B
Bash
Executable file
#!/bin/sh
|
|
suffix="${2:-bak}"
|
|
test -e "$1.$suffix" && ((test -e "$1" && mv -v "$1" /tmp); mv -vn "$1.$suffix" "$1") || mv -vn "$1" "$1.$suffix"
|