I tried searching for this question but I couldn't find a thread specifically like this one. I am trying to do a practice script where you enter in a source and a destination and the program copies the files for you.
./testscript
"name of file to copy?" file1
"to be copied to?" file2
"file1 has been copied to file2"
So far I have this:
#!bin/bash
echo -e 'Enter file name of file you wish to copy'
read $FILE1
echo -e 'Enter the file you wish to copy to'
read $FILE2
if cp $FILE1 $FILE2
then echo -e 'Copy was successful'
else echo -e 'Copy was unsuccessful'
fi
The program error is saying bad interpreter. I don't really understand, it looks okay from my end.