Hands-on task
This task is step 4 of the course “Bash: expansions, arrays and quoting”
Rename all .txt to .bak
/root/docs contains .txt files. Write and run a command/script that renames each of them, replacing the .txt extension with .bak.
What you'll practise:
- for
- mv
- parameter substitution
- ${var%suffix}
- glob patterns