in reply to Delete lines as i read them
If disk space is your major concern, I'd instead compress the input and output files. Text files typically compress to 10% of their initial size. Your command line could then besort --merge --unique fileA fileB > output
Both commands need some disk space in /tmp or in --temporary-directory. RAM usage can be fine tuned with --bufer-size. You'll find out about the --key option by yourself.zcat fileA.gz fileB.gz | sort --merge --uniq --compress-prog= gzip | g +zip > output.gz
|
|---|