From 2c3197aac4a5791381649dc431e9d91238920a66 Mon Sep 17 00:00:00 2001 From: Cody Littlewood Date: Wed, 17 Jun 2015 19:55:12 -0400 Subject: [PATCH] faster and one less pipe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c61a4b..e869739 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ A few examples of piecing together commands: - It is remarkably helpful sometimes that you can do set intersection, union, and difference of text files via `sort`/`uniq`. Suppose `a` and `b` are text files that are already uniqued. This is fast, and works on files of arbitrary size, up to many gigabytes. (Sort is not limited by memory, though you may need to use the `-T` option if `/tmp` is on a small root partition.) See also the note about `LC_ALL` above. ```sh - cat a b | sort | uniq > c # c is a union b + cat a b | sort -u > c # c is a union b cat a b | sort | uniq -d > c # c is a intersect b cat a b b | sort | uniq -u > c # c is set difference a - b ```