Error in module 2

For that you need to search for type casting in awk on google.

Okay, working on it . Thanks

1 Like

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.

Check this out.

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 !

Try using typecast in awk. It will help.

0! Check your code. error
Works fine when I run with shell

I am also getting the same. But in my case i can see the error in shell script itself.

Hey @Vaishnavi_Singh , from the error message it seems that there is some problem in line 25 of your script. Investigate and try to isolate the problem code. Then figure out the problem. Use the statements and TODO text to understand the requirement.