Skip to content
Advertisement

Why cant I get mv to rename and copy file?

The last thing I want to do in this script is take the userinput to rename the corresponding files to include .bak extension rather then .txt which will copy into a backup directory. I keep receiving an error messaging saying e.g.

JavaScript

The snippet in question (right at the bottom of full code):

JavaScript

Full code:

JavaScript

Advertisement

Answer

The correct one would be

JavaScript

Note: mkdir -p ~/students/Backup is not needed to put in the loop

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement