as per the question any file should be backed up which I was able to do but the check says an error occured & the correct answer check is not done. It is saying I couldn’t complete one task. please check.
Also, I did the check if the solution has been accepted… it has been accepted which is strange as running the file backup-file.sh is giving an error in the terminal
# This script creates a backup of a given file by creating a copy as bkp
# For example some-file is backed up as some-file_bkp
set -e
file_name=$1
cp $file_name ${file_name}_bkp
echo "Done"
I am sharing you the contents of the backup-file.sh & i followed the solution way changed the file-name to $1
now while executing the backup-file.sh i am getting
bob@caleston-lp10:~$ ./backup-file.sh
cp: missing destination file operand after '_bkp'
Try 'cp --help' for more information.