Printf

ph
이동: 둘러보기, 검색

Get hex code of a character

$> printf "%x%x\n" "'A" "'a"
4161

In manual page,
If the leading character is a single-quote or double-quote, the value shall be the numeric value in the underlying codeset of the character following the single-quote or double-quote. [1]