Why do I get 'syntax error near unexpected token' when running a standard Red Hat Support bash script?

Solution Verified - Updated -


  • 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++))


  • Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In