tags:

views:

134

answers:

2

How can I list differences between Mac's and Unix manuals?

For example, between the following commands

uniq
guniq

I tried the following unsuccessfully

diff (man uniq) (man guniq)
+1  A: 

Try this:

man uniq > uniq.man
man guniq > guniq.man
diff uniq.man guniq.man
Joachim Sauer
+8  A: 

That should be

diff <(man uniq) <(man guniq)

To answer saua's question from the comments:

Bash turns <(...) into a named pipe, which the diff program sees as a file. So as far as diff knows, it's comparing two files.

Paul Tomblin
Woah! How does that work? How does diff know which lines come from which command?
Joachim Sauer
Oh, some experimentation already showed me: "echo <(man uniq)" is quite revealing ;-)
Joachim Sauer