Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- echo "File Manager 1.0"
- echo "Usage: file {backup | remove | display}"
- read decision
- if [ "$decision" == "file backup" ]; then
- clear
- echo "What would you like to name the backed up file?"
- read backupname
- echo "What is the directory of the file you want to back up?"
- read backupdirectory
- cp $backupdirectory File_Backups/$backupname
- clear
- echo " . "
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo "Your file has been backed up."
- fi
- if [ "$decision" == "file remove" ]; then
- clear
- echo "What is the directory of the file you want to remove?"
- read fileremove
- echo "Are you sure you want to remove this file(You will never be able to get it back, I recommend backing it up first)"
- read decision2
- if [ "$decision2" == "yes" ]; then
- rm $fileremove
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo "The file has been removed."
- fi
- if [ "$decision2" == "no" ]; then
- echo "If you want to remove it later, go ahead and use file backup to back it up."
- fi
- fi
- if [ "$decision" == "file display" ]; then
- clear
- echo "What file would you like to display?"
- read filecat
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo " . "
- sleep 1
- clear
- echo "Displaying file now"
- sleep 1
- cat $filecat
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement