I am new to Linux using vi to create In bash shell.
I am trying to design a menu that allows input to select options.
I want an option that will copy my FriendsDetails folder to a backup folder".
I have created the menu interface I am going to use with the user being able to use Key Board letters to select each option but am unsure about a how the backup option script should be made.
[My code so far]
clear
If File BackupFriendsDetails Exists then
echo "File Do you want to overwrite File Yes, No"
if (Y)es then
cp /home/FriendsDetails > /home/FriendsDetails/BackupFriendsdetails
echo "File saved"
end if
if (N)o then
echo "Warning File not backed up"
clear
end if
else (first if) If file does not exist
mkdir /home/FriendsDetails/BackupFriendsDetails
cp /home/FriendsDetails > /home/FriendsDetails/BackupFriendsDetails
echo "File saved"
clear
end else
end if
[End code so far]
Any thoughts or suggestions of where help can be found will be greatly appreciated.
Thanks
I am trying to design a menu that allows input to select options.
I want an option that will copy my FriendsDetails folder to a backup folder".
I have created the menu interface I am going to use with the user being able to use Key Board letters to select each option but am unsure about a how the backup option script should be made.
[My code so far]
clear
If File BackupFriendsDetails Exists then
echo "File Do you want to overwrite File Yes, No"
if (Y)es then
cp /home/FriendsDetails > /home/FriendsDetails/BackupFriendsdetails
echo "File saved"
end if
if (N)o then
echo "Warning File not backed up"
clear
end if
else (first if) If file does not exist
mkdir /home/FriendsDetails/BackupFriendsDetails
cp /home/FriendsDetails > /home/FriendsDetails/BackupFriendsDetails
echo "File saved"
clear
end else
end if
[End code so far]
Any thoughts or suggestions of where help can be found will be greatly appreciated.
Thanks