Skip to content

Instantly share code, notes, and snippets.

@bougui505
Created January 9, 2020 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bougui505/0fff7f9cc6cbd1cfea8f683529c4a66d to your computer and use it in GitHub Desktop.
Save bougui505/0fff7f9cc6cbd1cfea8f683529c4a66d to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-01-09 11:32:55 (UTC+0100)
if [ $# -eq 1 ]; then
cp -pvi "$1" "${1}.bak"
else
echo "Info: $0 copies to a backup file"
echo "Usage: $0 <file to be backed up with .bak extension>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment