I am getting returncode > 0! Check your code error. Unable to rectify the error. I am using grep and gawk commands.
Hi @Vaishnavi_Singh, could you provide more info about how you got the error, what steps you were performing. The info you provided is kind of vague for me to provide a definite solution .
Hmm… can you re-read the TODO in the check_QBox_server_memory.sh
file. You are very close to the solution!
Okay, i can figure out that maybe i am using string and need to convert to integer. But how to do that ?
For that you need to search for type casting in awk
on google.
Okay, working on it . Thanks
I think that converts string into float not int. Use another solution.
i think posting code is not allowed better delete this ASAP
using %d also, i am getting permission denied.
still getting permission denied
Is this issue resolved or not?
not resolved. Unable to figure out what’s wrong in my code ?
Try using cut command
Here you go for the reference: https://www.geeksforgeeks.org/cut-command-linux-examples/
I have similar issue ? Is this issue resolved?
Not resolved till now.
Now i am able to get the integer from the string. But still getting the same error : ./check_QBox_server_memory.sh: line 25: /proc/meminfo: Permission denied
Please Somebody from crio team help us. how to type cast variable to integer value?
How did you get this?
For permission denied you have use chmod command
I am using chmod, but still getting permission denied. I even tried sudo chmod !