This is an old revision of the document!
#!/bin/bash # jt powered cmd=$(basename $0) dt=$(/bin/date +%Y%m%d-%H%M) int="jt" archdir="archive/" if [ $# -lt 1 ]; then cmd=$(basename $0) echo "Usage: $cmd <filename>" exit 1 fi if cp -p "$1" "$archdir$1.$dt.$int" then ls -l "$archdir$1.$dt.$int" read -p "Press enter to begin edit" vim "$1" else echo "$cmd quitting: can't make backup?" 1>&2 fi