#!/bin/bash echo "what directory are we backing up (use * for pwd)?" read source while ["$tar" != "y"] || [ "$tar" != "n"] do echo "are we creating a tar (y/n)?" read tar done echo "where are we putting the backup?" read dest echo $source echo $tar echo $dest if [$tar="y" || $tar="yes"] then echo "what are we calling the tar file?" read tarName echo "will now tar..." tar -cvvf $tarName $source mv $tarName $dest exit 0 else if [$tar!= "yes" || "y"] then rsync -tr $source/* $dest/ exit 0 else echo "some nasty error has occured" exit 0 fi echo "you should never see this" exit 0