Module 2 error can't convert to int

hello people
Actually I am stuck in one error from past two days , i.e. in milestone 4 of module 2 where reqd os version is 18.00 I have manipulated the data from file and successfully stored it in a variable as 18.04 by using various combination of cut and awk but the problem is it is string and my every attempt to convert it into float is failing I am stuck into these for last two days please help

Now that you have got the data and stored it in a variable, use pattern matching to remove the decimal part. Also there is no int( ) function here as in some other languages that you might have worked with
hints:
check
" .* " for pattern matching
usage of: variable%pattern

1 Like

You can use typecasting in awk, check out my previous answer to this question.

1 Like