#!/usr/bin/zsh if [[ $# != 1 ]]; then echo "Usage: $0 [FILE]" exit 1 fi backup="$(mktemp)" mv $1 $backup cp $backup $1 rm $backup