Basically it's for a work assignment.
Have to make a menu with the following choices
***************menu*********************
1) Show Current Directory
2) Dispaly Current Time and Date
3) Copy
4) Change Password
5) write directory to file
6) Edit File Directory
7) Make backup from /home/user
8) Show proces of this script
9) Show name and version of OS
10) Close and Shutdown System
q) Stop
I managed to do all of them using a check-function with a case inside it.
1)
echo `pwd`
back
;;
2)
echo `date`
back
;;
3)
kopie
/////////function
back
/////////funcion which takes you back to choice menu
;;
4) wijzigpaswoord
//////function
back
;;
5) dumb -f dirdump.dmp `pwd`
back
;;
6) vi `pwd`/dirdump.dmp
back
;;
7)
8) ps -ef grep menu
9)echo `uname -ov`
terug
;;
10) shutdown -P now
terug
;;
q)
clear
break
----------
Only problem is the 7th option. I have absolutely no clue whatsoever how to do this thing or how to make it happen.
Figured as last hope I'll try here to see if there are any Linux-experts at work.
What 7 should do:
choice 7, make a back up of the current directory, in this case home/user .all files in this directory should be copied first to filename.back after which, they have to be copied to directory /backup, make a a test if this directory exists, if not create it. If the files are transfered, remove the bac-files from your directory.
If anybody can help me, thx in advance.