0
grep -a 'END:' RTFC-1.bin | wc -l

This command is not giving me the word count 'END:' happens to be in a Binary file. I am testing this command on MINGW32 on Windows.

  • 3
    What is your goal, in counting "lines" in a binary file? Binary files do not necessarily have lines, per se. So what are you really trying to get from the wc -l? – Jim L. May 7 at 20:37
  • Do you want grep -a -c 'END:' RTFC-1.bin to get the count, or are you just trying to see if it exists at all, when if grep -a -q 'END:' RTFC-1.bin; then echo found; fi might be the answer. – icarus May 8 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.