Bash Scripts

Nov 17, 2025

Lab Exercise

  • Write a script that makes a copy of each file that has the .txt extension. The copies should be named filename.txt.bak. After making the copy, the script should move it to the /tmp directory.
  • While running the script, the directory where it should look for the files should be provided as an argument.
  • If no argument was provided, the script should exit with code 9.

- Clint Jordan