#!/bin/bash BLOG=/home/users/sderle/public_html/blog/entry EDITOR=vi FILE=$1.txt #### [ "$FILE" == ".txt" ] && exit 255 cd $BLOG cp -a $FILE $FILE.bak $EDITOR $FILE touch -r $FILE.bak $FILE rm $FILE.bak