diff --git a/c/mapping/mapper_tee.c b/c/mapping/mapper_tee.c index 82b9ff7fc..f91cc6104 100644 --- a/c/mapping/mapper_tee.c +++ b/c/mapping/mapper_tee.c @@ -62,8 +62,14 @@ static mapper_t* mapper_tee_parse_cli(int* pargi, int argc, char** argv) { } static void mapper_tee_usage(FILE* o, char* argv0, char* verb) { - fprintf(o, "Usage: %s %s [options]\n", argv0, verb); - fprintf(o, "xxx write this up please.\n"); + fprintf(o, "Usage: %s %s [options] {filename}\n", argv0, verb); + fprintf(o, "Passes through input records (like %s cat) but also writes to specified output\n", + MLR_GLOBALS.bargv0); + fprintf(o, "file, using output-format flags from the command line (e.g. --ocsv). See also\n"); + fprintf(o, "the \"tee\" keyword within %s put, which allows data-dependent filenames.\n", + MLR_GLOBALS.bargv0); + fprintf(o, "Options:\n"); + fprintf(o, "--no-fflush: don't call fflush() after every record.\n"); } // ---------------------------------------------------------------- diff --git a/c/todo.txt b/c/todo.txt index e21f33575..0be1d7800 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -21,9 +21,8 @@ TOP OF LIST: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - COMMON: -! AST: FILE_WRITE --> stdout/stderr x all -* put/tee --oxxx flags * put/tee --no-flush flags +* put/tee --oxxx flags * mlr -k needs >/>> examples incl. stdout/stderr/file. also some subset at mlr put -h. * lrec_reader/writer take sub-bagged cliopts pstructs diff --git a/doc/mlr.1 b/doc/mlr.1 index 173572c62..7d4c10c20 100644 --- a/doc/mlr.1 +++ b/doc/mlr.1 @@ -2,12 +2,12 @@ .\" Title: mlr .\" Author: [see the "AUTHOR" section] .\" Generator: ./mkman.rb -.\" Date: 2016-07-28 +.\" Date: 2016-07-30 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "MILLER" "1" "2016-07-28" "\ \&" "\ \&" +.TH "MILLER" "1" "2016-07-30" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Portability definitions .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1254,8 +1254,12 @@ Passes through the last n records, optionally by category. .RS 0 .\} .nf -Usage: mlr tee [options] -xxx write this up please. +Usage: mlr tee [options] {filename} +Passes through input records (like mlr cat) but also writes to specified output +file, using output-format flags from the command line (e.g. --ocsv). See also +the "tee" keyword within mlr put, which allows data-dependent filenames. +Options: +--no-fflush: don't call fflush() after every record. .fi .if n \{\ .RE