Is it safe to pipe the output of several parallel processes to one file using >>?

后端 未结 9 1316
一整个雨季
一整个雨季 2020-12-25 11:20

I\'m scraping data from the web, and I have several processes of my scraper running in parallel.

I want the output of each of these processes to end up in the same f

9条回答
  •  眼角桃花
    2020-12-25 11:55

    As mentioned above it's quite a hack, but works pretty well =)

    ( ping stackoverflow.com & ping stackexchange.com & ping fogcreek.com ) | cat
    

    same thing with '>>' :

    ( ping stackoverflow.com & ping stackexchange.com & ping fogcreek.com ) >> log
    

    and with exec on the last one you save one process:

    ( ping stackoverflow.com & ping stackexchange.com & exec ping fogcreek.com ) | cat
    

提交回复
热议问题