How do i diff two files from the web

command-line-interface, curl, diff, pipe, unix

Solution

The UNIX tool `diff` can compare two files. If you use the `<()` expression, you can compare the output of the command within the indirections:

diff <(curl file1) <(curl file2)

So in your case, you can say:

diff <(curl -s http://to.my/file/one.js) <(curl -s http://to.my/file.two.js)

Problem

I want to see the differences of 2 files that not in the local filesystem but on the web. So, i think if have to use `diff`, `curl` and some kind of piping. Something like ``` curl http://to.my/file/one.js http://to.my/file.two.js | diff ``` but it doesn't work.

Original source