There is online tool that can convert text to ASCII such as this one. Would it be possible to do the same thing in Ubuntu/Linux?
E.g.
Input data: abc
Output as ASCII: 097 098 099 3 3 Answers
Take a look at the old standby, od. Your ASCII to decimal would be:
echo -n abc | od -td1See the man page for od, or "octal dump",
man od For the many options in converting input to other forms -- hex, decimal, ASCII, char, etc.
2You want to convert from ASCII symbol to its decimal value.
The complete table is on man ascii (or just ascii).
ASCII to decimal: "a" → "97"
printf "%d\n" \'aDecimal to ASCII: "97" → "a"
printf '%b' $(printf '\\%03o' "97") 2 Another way to do this, with Perl's unpack:
$ echo abc | perl -lne 'print join " ", unpack("C*")'
97 98 99More verbosely using split and ord,
$ echo abc | perl -lne 'print join " ", map { ord $_ } split //'
97 98 99Reference: Converting Between ASCII Characters and Values
1