I want to print out both the 7th (or whatever) byte and the last byte of a particular file. I want to do this via the command line using the ruby command. (I’m on Mac OS X, but it shouldn’t matter.)
How do I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This prints the integer value of each byte, which is a bit more understandable than your request to print in base 64: