I'm trying to extract value after Colon
in a string which will be integer value later to compare, but I see $
and \r
after extracting, so I'm not able to compare integers
Ex:
count=$(echo "Bengaluru:10" | awk -F":" '{print $2}')
Result will be 10
only, but actually it's having additional hidden characters like $'10\r'
So I'm not able to compare this value with some other integer.
Please help me, how can i remove those values $
and \r