Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 763 Bytes

README.md

File metadata and controls

31 lines (17 loc) · 763 Bytes

Task 6 Submission Guidelines

  1. Create a directory named task-6.

  2. Inside the task-6 directory, create a file named rename_files.sh.

  3. Upload the task-6 directory to your tasks GitHub repository using Git on the CLI, Tasks submitted through GitHub, using GUI will be rejected.


Task: Rename Files with a Bash Script

Task Description:

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.

Example:

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

Deliverable:

The completed rename_files.sh script.