How to convert ASCII character to integer in bash?
I'm parsing an ntpq output to pass its contents to our database via console utility. The first element is a one character substring containing status of the remote. It can be "*", "+", "o", "#" etc. I'd better put it to the DB as a number, so it can be easily held by stored procedures, but I have no idea, how to convert a character into it's ASCII representation in bash.
I'm parsing an ntpq output to pass its contents to our database via console utility. The first element is a one character substring containing status of the remote. It can be "*", "+", "o", "#" etc. I'd better put it to the DB as a number, so it can be easily held by stored procedures, but I have no idea, how to convert a character into it's ASCII representation in bash.
No comments:
Post a Comment