Files
container.training/slides/rename.sh
2017-11-08 10:41:56 -08:00

12 lines
204 B
Bash
Executable File

#!/bin/sh
if ! [ -f "$1" ]; then
echo "File $1 not found, aborting."
exit 1
fi
if [ -f "$2" ]; then
echo "File $2 already exists, aborting."
exit 1
fi
git mv "$1" "$2"
sed -i "" "s,$1,$2," */*.md