Error while running script in terminal

I am getting an error while trying to run the check_QBox_server_memory.sh file in the terminal. The command I wrote is correct because I checked the output on the terminal for the command before adding it to the .sh file.

Command I used: ./check_QBox_server_memory.sh /proc/meminfo
Error I got: bash: ./check_QBox_server_memory.sh: bin/bash: bad interpreter: No such file or directory
pwd : /home/crio-user/workspace/a-pratham1998-ME_QBOX/server_configuration

Hi @APratham
Looks like you are facing challenges in the current module.

Below is a link to all the FAQ’s for the current module

Below are a few similar topics raised by other users which you might find usefull

Note - This is a BETA Feature,if you find this helpful, kindly let us know.
Feedback link - https://forms.gle/cmxN5pdTXgnwgC986

Kindly mark this as a solution if this has helped you solve your query

Hi @APratham,

Could you try changing the first line of the .sh from: #!/bin/bash to: #!/usr/bin/bash and see if that helps?

Thanks!

Done. Still getting the same error

Alright, then the issue is not related to the interpreter at all. Please make sure that the first line is #!/bin/bash

Can you please confirm you have used the right variables? It is possible the variables you have defined and the ones you are storing the result in do not match the predefined lines of if else conditions.

I have checked the variables too. I could try once by replacing the first line back to #!/bin/bash

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.