A Bash script to copy a file to the /tmp/ directory. The script also appends the date, as well as a unique 4 digit number, to the name of the file.
./tmpBackup.sh
[*] Please enter the file/directory you wish to have backed up: example1.txt
[*] Backing up example1.txt to /tmp/example1.txt.2021-09-07.J7XZ
[+] Backup succeeded!