I need to sort many files and then dump into many files in order of 1.csv, 2.csv, 3.csv and so on with each file of equal size.
The following pipe sorts and then dump into a single huge file
cat input_files | sort > one_huge_file
How do I dump into multiple files?
sort input_files > one_huge_fileor evensort -o one_huge_file input_fileswhich has the additional (possible) benefit thatone_huge_filecould be one of the input files, though in this case, it probably wouldn't. Thecat | sortnotation is a candidate for the UUOC award.cat | sortper se, but why to fork another process whensortcan read the input file on it's own. You are only callingcatso thatsortcan read stream of data thru thepipe, isn't it?