Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 2
    it's because the start of the pdf files fool diff into thinking that they're text files that can be diffed, and at least one of the output lines contains control characters that do weird things to your terminal. i.e. the same issue as cat-ing an image or other binary file to the terminal Commented Mar 7, 2018 at 12:28
  • 2
    e.g. See Why using cat on binary files messed up the terminal and how? Commented Mar 7, 2018 at 12:30
  • @cas: thanks, I hadn't seen that question before. I updated my question accordingly. Commented Mar 7, 2018 at 15:14
  • escape codes can cause the terminal to actually enter data into the command line as if typed. long ago that used to be a reasonably common prank/hack method to get people to display a file that would reprogram their terminal or keyboard or push keystrokes into their input buffer. BTW, you're mis-understanding what he said about piping into bash. Commented Mar 7, 2018 at 16:30
  • 1
    The example 1;2c, etc., is the terminal's response to the primary device attributes control (likely escape Z). Commented Mar 8, 2018 at 0:50