Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question
    
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 '13 at 16:34
    
The command in the linked article is different than the one you've included above. –  patrix Mar 25 '13 at 16:38
    
@patrix They command is having some escape characters issue with SO's escaping characters. –  Kaunteya Suryawanshi Mar 25 '13 at 16:43
    
As your question is more about the non-working shell pipeline than the Retina topic, I've changed the title accordingly. –  patrix Mar 25 '13 at 16:51
    
Can you please add the output of ioreg -lw0 | grep \"EDID\" to the question? –  patrix Mar 25 '13 at 16:54
add comment

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.

share|improve this answer
    
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 '13 at 18:03
add comment

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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