the main file used to do with that awk script for reasons unbeknownst to either of us

There is no way the output of sort can be written before its entire input was generated. As I wrote in my last post: "the first line in the output can possibly be the last processed line". Excerpt from 'info sort':
‘-o OUTPUT-FILE’
‘--output=OUTPUT-FILE’
     Write output to OUTPUT-FILE instead of standard output.  Normally,
     ‘sort’ reads all input before opening OUTPUT-FILE, so you can
     safely sort a file in place by using commands like ‘sort -o F F’
and ‘cat F | sort -o F’. However, ‘sort’ with ‘--merge’ (‘-m’) can
     open the output file before reading all input, so a command like
     ‘cat F | sort -m -o F - G’ is not safe as ‘sort’ might start
     writing ‘F’ before ‘cat’ is done reading it.

Reply via email to