Aaargh! "cat | sort" is an antipattern.
Sort accepts a list of files as arguments. "sort [flags] file1 file2 ..." is more concise, more efficient, and is less likely to run out of space.
Sort accepts a list of files as arguments. "sort [flags] file1 file2 ..." is more concise, more efficient, and is less likely to run out of space.
</dir/file sort | uniq >outfile
foo bar < a
foo < a bar
< a foo bar > a # from stdout to file
< a # simply the opposite operation: from file to stdin