I'm working on a Milestone for my IT class and I've written a Linux script using the vi editor that should perform the necessary tasks. The instructions direct me to create a script within the vi editor that creates a text file into which the current date is written, creates a directory entitled COPY, copies the previously created text file into the new directory, and renames the directory with the title of the file.
The script I have is the following
#!/bin/bash
date > Time_File.txt
mkdir -p COPY
cp Time_File.txt COPY
mv COPY Time_File
For some reason, after changing to the appropriate permissions within the Codio terminal I'm using, running this script will produce the Time_File.txt just fine and with the appropriate content, but the COPY directory appears like a file might on the left hand side and whenever I click to see the contents, an error message is given. The error message says "IOException: Error during file operation. Internal Error" and I'm not entirely sure what that means.
I've tried several solutions including reordering the code but nothing I do seems to work. Any suggestions?