The comment above is the script from [root tip] [Utililty Script] Backup configuration and package list
- you are missing the first lines
- most importantly the line defining the shell to use.
- the first line is not commented
- causing the the shell to try interpret what should have been a comment as actual commands
Do yourself a favor and copy the whole script - and paste it into whichever file you saved it as