1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 02:39:03 -08:00
rc/sh/baknow
2021-07-29 00:37:35 -07:00

8 lines
147 B
Bash

#!/usr/bin/env sh
# YES_ZSH
baknow() {
cp -ip "${1:?missing file argument}" "$1.$(now "$1").bak"
}
[ "${SOURCING:-0}" -gt 0 ] || baknow "$@"