As the title say. I need to be able to backup and then recover files.
To make the back up was pretty simple
if [ "$bup" = "true" ]; then
cp $file $file.bak
But to make the recovery.. was not as stright forward.
elif [ "$rup" = "true" ]; then
bak=`find /path/to/file/ | grep .bak`
cp $bak ${bak/\.bak}
fi
It works in bash but i need it to work in sh..