mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-19 17:35:16 +00:00
redirected-output examples at cover docs
This commit is contained in:
parent
8e51a219c8
commit
5acdea4590
9 changed files with 25 additions and 2 deletions
|
|
@ -34,6 +34,9 @@ indices. Examples:
|
|||
$mean = $sum / $count # no assignment if count unset
|
||||
'
|
||||
% mlr --from infile.dat put -f analyze.mlr
|
||||
% mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
% mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
% mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
```
|
||||
|
||||
This is something the Unix toolkit always could have done, and arguably always
|
||||
|
|
|
|||
|
|
@ -248,6 +248,10 @@ static void main_usage_examples(FILE* o, char* argv0, char* leader) {
|
|||
fprintf(o, " }\n");
|
||||
fprintf(o, " $mean = $sum / $count # no assignment if count unset'\n");
|
||||
fprintf(o, "%s%s --from infile.dat put -f analyze.mlr\n", leader, argv0);
|
||||
fprintf(o, "%s%s --from infile.dat put 'tee > \"./taps/data-\".$a.\"-\".$b, $*'\n", leader, argv0);
|
||||
fprintf(o, "%s%s --from infile.dat put -q '@v=$*; dump | \"jq .[]\"'\n", leader, argv0);
|
||||
fprintf(o, "%s%s --from infile.dat put '(NR %% 1000 == 0) { print > stderr, \"Checkpoint \".NR}'\n",
|
||||
leader, argv0);
|
||||
}
|
||||
|
||||
static void list_all_verbs_raw(FILE* o) {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ COMMON:
|
|||
* mlr -k | grep mlr | sed 's/Example: //' | sh 1>1 2>2
|
||||
! flesh out ...'s in mlr -k's
|
||||
|
||||
* some >/>>/| at cover x 3
|
||||
|
||||
* lrec_reader factor take popts as well
|
||||
~ lrec_reader/writer take sub-bagged cliopts pstructs
|
||||
~ put/tee --oxxx flags overlays, w/ substruct data & federated substruct fcns
|
||||
|
|
|
|||
|
|
@ -16,3 +16,6 @@
|
|||
$mean = $sum / $count # no assignment if count unset
|
||||
'
|
||||
% mlr --from infile.dat put -f analyze.mlr
|
||||
% mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
% mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
% mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
|
|
|
|||
|
|
@ -169,6 +169,9 @@ positional indices. For example:
|
|||
$mean = $sum / $count # no assignment if count unset
|
||||
'
|
||||
% mlr --from infile.dat put -f analyze.mlr
|
||||
% mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
% mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
% mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
</pre>
|
||||
</div>
|
||||
<p/>
|
||||
|
|
|
|||
|
|
@ -185,6 +185,9 @@ EXAMPLES
|
|||
}
|
||||
$mean = $sum / $count # no assignment if count unset'
|
||||
mlr --from infile.dat put -f analyze.mlr
|
||||
mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
|
||||
DATA FORMATS
|
||||
DKVP: delimited key-value pairs (Miller default format)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ EXAMPLES
|
|||
}
|
||||
$mean = $sum / $count # no assignment if count unset'
|
||||
mlr --from infile.dat put -f analyze.mlr
|
||||
mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
|
||||
DATA FORMATS
|
||||
DKVP: delimited key-value pairs (Miller default format)
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ mlr --from estimates.tbl put '
|
|||
}
|
||||
$mean = $sum / $count # no assignment if count unset'
|
||||
mlr --from infile.dat put -f analyze.mlr
|
||||
mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
|
|
|
|||
|
|
@ -336,6 +336,9 @@ Command-line-syntax examples:
|
|||
}
|
||||
$mean = $sum / $count # no assignment if count unset'
|
||||
mlr --from infile.dat put -f analyze.mlr
|
||||
mlr --from infile.dat put 'tee > "./taps/data-".$a."-".$b, $*'
|
||||
mlr --from infile.dat put -q '@v=$*; dump | "jq .[]"'
|
||||
mlr --from infile.dat put '(NR % 1000 == 0) { print > stderr, "Checkpoint ".NR}'
|
||||
|
||||
Data-format examples:
|
||||
DKVP: delimited key-value pairs (Miller default format)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue