-
Create a directory named
task-6
. -
Inside the
task-6
directory, create a file namedrename_files.sh
. -
Upload the
task-6
directory to your tasks GitHub repository using Git on the CLI, Tasks submitted through GitHub, using GUI will be rejected.
Write a bash script (rename_files.sh
) that renames all .txt
files in a given directory by adding a prefix old_
to each file name.
If the directory my_files
contains:
document.txt
notes.txt
After running the script, the files should be renamed to:
old_document.txt
old_notes.txt
The completed rename_files.sh
script.