I saved the session output from putty to my windows desktop (puttyoutput.txt) and after that i uploaded it to my server. The problem comes when trying to grep the file (cat puttyoutout.txt |grep searchterm)

Binary file (standard input) matches

Any ideea why this happens or how can i avoid it?

p.s. i'am also trying to grep for ips where i cant the -a option (grep -aEx '([0-9]{1,3}.){3}[0-9]{1,3}' puttyoutput.txt)

  • might be some terminal control-sequences or a utf8-unaware grep that causes the problem. how does the file look like on the server? maybe ftp with text-mode? is puttyoutout.txt the same as puttyoutput.txt (or just a typo)? – stoney Jun 13 '18 at 13:13
  • The output of file puttyoutput.txt might be helpful here – steeldriver Jun 13 '18 at 13:24
strings puttyoutout.txt |grep searchterm

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.