This may not mimic xxd output as other answers do, but allows you to see the \r\n-type characters that are causing problems. You can use python3 inline to print the ASCII characters. To output the ASCII value, you precede the double-quoted variable name with a single-quote, e.g. Or - If I have it backwards, and you actually want the ASCII value for every character in the string, you can use a simple for loop and printf to print the ASCII value of every character. Let me know if you need a slightly different output format and I'm happy to help further. Which depending on what you want as output may be all you need. You use sed to create a newline delimited list of 2-character strings and by outputting as a string you avoid the control character conversion issues with, e.g. You can actually use printf and sed to split every 2 characters and output in whatever format you need.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |