Also given the script.
Bash bad substitution string.
Recent versions of bash e g.
If your shell is a sufficiently recent version of bash that parameter expansionnotation should work.
You are using bash shebang then you should be using bash to run your script instead of sh anubhava dec 2 13 at 9 29 add a comment your answer.
The overflow blog tips to stay focused and finish your hobby project.
Bash bad substitution when converting string variables to uppercase or lowercase converting strings in your bash script from lowercase to uppercase or viceversa is a common requirement.