The command

ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6

is not giving any result. Can any one help.

I got this command from an article that maintains (I paraphrase) that rMBP can have Samsung / LG screens, and that the LG screens are all defective.

My MacBook Pro retina 13" so I naturally wanted to check the details of my hardware. Mine is zsh

  • Your question could use some work. Please clarify what you are trying to accomplish instead of just linking to an external site.
    – Gerry
    Mar 25, 2013 at 16:34
  • The command in the linked article is different than the one you've included above.
    – nohillside
    Mar 25, 2013 at 16:38
  • @patrix They command is having some escape characters issue with SO's escaping characters.
    – Kaunteya
    Mar 25, 2013 at 16:43
  • As your question is more about the non-working shell pipeline than the Retina topic, I've changed the title accordingly.
    – nohillside
    Mar 25, 2013 at 16:51
  • Can you please add the output of ioreg -lw0 | grep \"EDID\" to the question?
    – nohillside
    Mar 25, 2013 at 16:54

2 Answers 2


One way to debug command-line pipes is to insert | tee debug.txt between two steps and look at the file debug.txt to check whether the previous steps are correct.

  • This is a great way to debug things. In your case, you want to grep for IODisplayEDID as opposed to \"EDID\" so that you get the string output from the ioreg input.
    – bmike
    Mar 25, 2013 at 18:03

Another way to debug pipes is to add each element in sequence until you have a problem. For example, start with

ioreg -lw0 | grep \"EDID\"

which outputs nothing. That means there is no string "EDID" output by ioreg. So there's the problem.

But hey, I don't like seeing a problem unsolved: let's simplify a little more by getting rid of the quotation marks. I assume your Mac is like mine.

ioreg -lw0 | grep EDID

matches a string IODisplayEDID. Substituting IODisplayEDID for EDID in the grep argument succeeds. Don't forget to "escape" the quotes with a backslash (or, in this case, you can omit the quotes and get the same result).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .