Diff & Named pipes in OSX?

previously I wrote about using named pipes to avoid temporary files when working from the CLI. The odd thing is that the following command seems to work on bash/linux but responds with an error message (curl: (23) Failed writing body) on bash/OSX

diff <(curl http://www.google.com) <(curl http://www.google.com?q=a)

I don’t really understand why this doesn’t work, but it seems that to the process the pipes differ from the default stdout where they shouldn’t. To bad, it would be useful!

update

While googling arround I found a page breaking down the problem. Greg Miller discovered that the actual problem is HFS+ (the filesystem) returning the same inode number for two different files; which since it isn’t inode base could be somehow correct.

Hopefully Apple will fix this in the near future, but I guess I’d better grab myself the sources and build my own version of diff.

This entry was posted in osx. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>