Playback error: An error occurred loading items to play

You need to make it in to a bash script, then execute the script.

  1. Create a new text file, e.g. script.sh.
  2. Add a shebang as the first line: #!/usr/bin/env bash.
  3. Paste the commands below the shebang.
  4. Ensure the file uses Unix (LF) line endings.
  5. Make it executable: chmod +x script.sh.
  6. Run it: ./script.sh.

Google for more info.