Why do I get 'syntax error near unexpected token' when running a standard Red Hat Support bash script?
Issue
- There is the following error running the high_cpu_linux.sh script:
$ ./high_cpu_linux.sh 29392 : bad interpreter: No such file or directory $ sh ./high_cpu_linux.sh 29392 : command not found: line 11: : command not found: line 16: '/high_cpu_linux.sh: line 17: syntax error near unexpected token ` '/high_cpu_linux.sh: line 17: `for ((i=1; i <= $LOOP; i++))
Environment
- Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.