I have a binary file. If I open it with vi, it shows sequences of human-readable text and binary characters. What is the best way to extract the human-readable portion only using Bash?
I was thinking, maybe we can do this over a grep or sed pattern?
cat file1.bin | grep '????' > newfile.txt
Advertisement
Answer
Use the strings
utility – that’s exactly what it’s designed for.