shoestrap/assets/default/bin/bak

11 lines
160 B
Plaintext
Raw Permalink Normal View History

#! /bin/bash
for f in "$@"; do
ext="${f##*.}"
if [[ "$ext" == "bak" ]]; then
cp "$f" "${f%.*}"
else
cp "$f" "${f}.bak"
fi
done