News for hackers. Stuff that matters.
Re:Unix: When pipes get names by smlacy on Tuesday October 08, 2013 @07:49PM (#6518633)
Sort a file in "parallel" (note quotes!) in a multicore machine (note I'm showing 2 cores but this could be generalized to more):

    mkfifo split_aa
    mkfifo split_ab
    mkfifo sorted_aa
    mkfifo sorted_ab
    split -n2 input_file split_ & 
    sort split_aa >> sorted_aa & 
    sort split_ab >> sorted_ab & 
    sort -m sorted_aa sorted_bb > final_sorted
It's left as an exercise for the reader to determine if this actually saves any time, and if this technique could be used to implement a truly parallel sort.
Re:Unix: When pipes get names by timClicks on Wednesday October 09, 2013 @01:43AM (#6519608)
What about?

    sort --parallel=2 input_file
Re:Unix: When pipes get names by smlacy on Wednesday October 09, 2013 @02:31PM (#6522941)
Well, yeah, that's the easy way. :)

This is mostly to illustrate a technique of "parallel processing using fifos and split input" It's almost like a miniature mapreduce running locally. See also "bashreduce" (https://github.com/erikfrey/bashreduce) which I didn't write.