How do i diff two files from the web

前端 未结 2 1158
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-04 02:54

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 pi

2条回答
  •  情歌与酒
    2021-01-04 03:10

    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)
    

提交回复
热议问题