From f3cecaa5b8d87e18e9141ec8b3f97282d8d8f1d1 Mon Sep 17 00:00:00 2001 From: jungle-boogie Date: Fri, 9 Oct 2015 07:38:08 -0700 Subject: [PATCH] Update faq.html --- doc/faq.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/faq.html b/doc/faq.html index 3baf6a91f..f1908fcc0 100644 --- a/doc/faq.html +++ b/doc/faq.html @@ -153,16 +153,16 @@ grep 'various sorts' *.log | sed 's/.*} //' | mlr --fs space --repifs stats1 -a

How do I examine then-chaining?

-

Then-chaining in Miller is intended to function the same as Unix pipes. You +

Then-chaining found in Miller is intended to function the same as Unix pipes. You can print your data one pipeline step at a time, to see what intermediate output at one step becomes the input to the next step. -

First look at the input data: +

First, review the input data:

-$ cat data/then-example.txt
+$ cat data/then-example.csv
 Status,Payment_Type,Amount
 paid,cash,10.00
 pending,debit,20.00
@@ -173,12 +173,12 @@ paid,debit,30.00
 

-Then run the first step of your command, omitting anything from the first then onward: +Next, run the first step of your command, omitting anything from the first then onward:

-$ mlr --icsv --rs lf --opprint count-distinct -f Status,Payment_Type data/then-example.txt
+$ mlr --icsv --rs lf --opprint count-distinct -f Status,Payment_Type data/then-example.csv
 Status  Payment_Type count
 paid    cash         2
 pending debit        1
@@ -188,12 +188,12 @@ paid    debit        1
 

-Then run it with the next then step included: +After that, run it with the next then step included:

-$ mlr --icsv --rs lf --opprint count-distinct -f Status,Payment_Type then sort -nr count data/then-example.txt
+$ mlr --icsv --rs lf --opprint count-distinct -f Status,Payment_Type then sort -nr count data/then-example.csv
 Status  Payment_Type count
 paid    cash         2
 pending debit        1
@@ -203,14 +203,14 @@ paid    debit        1
 

-Now if you go on to include another then step after this, the columns Status, -Payment_Type, and count will be its input. +Now if you include another then step after this, the columns Status, +Payment_Type and count will be its input. -

Note, by the way, that you’ll get the same results using pipes: +

Note, by the way, that you will get the same results using pipes:

-$ mlr --csv --rs lf count-distinct -f Status,Payment_Type data/then-example.txt | mlr --icsv --rs lf --opprint sort -nr count
+$ mlr --csv --rs lf count-distinct -f Status,Payment_Type data/then-example.csv | mlr --icsv --rs lf --opprint sort -nr count
 Status  Payment_Type count
 paid    cash         2
 pending debit        1