mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
-N as keystroke-saver for --implicit-csv-header --headerless-csv-output
This commit is contained in:
parent
7870562def
commit
4befcff604
8 changed files with 42 additions and 14 deletions
|
|
@ -937,6 +937,7 @@ static void main_usage_csv_options(FILE* o, char* argv0) {
|
|||
fprintf(o, " of input files. Tip: combine with \"label\" to recreate\n");
|
||||
fprintf(o, " missing headers.\n");
|
||||
fprintf(o, " --headerless-csv-output Print only CSV data lines.\n");
|
||||
fprintf(o, " -N Keystroke-saver for --implicit-csv-header --headerless-csv-output.\n");
|
||||
}
|
||||
|
||||
static void main_usage_double_quoting(FILE* o, char* argv0) {
|
||||
|
|
@ -2099,6 +2100,10 @@ int cli_handle_reader_writer_options(char** argv, int argc, int *pargi,
|
|||
pwriter_opts->ofile_fmt = "markdown";
|
||||
argi += 1;
|
||||
|
||||
} else if (streq(argv[argi], "-N")) {
|
||||
preader_opts->use_implicit_csv_header = TRUE;
|
||||
pwriter_opts->headerless_csv_output = TRUE;
|
||||
argi += 1;
|
||||
}
|
||||
*pargi = argi;
|
||||
return argi != oargi;
|
||||
|
|
|
|||
|
|
@ -44935,6 +44935,22 @@ zee 2 0.923068348748175560 0.009737410587136359
|
|||
zee 3 0.000047786161325772 0.803142013402256216
|
||||
zee 4 0.676537984365847889 0.573903236805416328
|
||||
|
||||
mlr --csv -N reorder -f 1,3,2,5,4 ./reg_test/input/multi-sep.csv-crlf
|
||||
a/,i/,b/,y/,x/
|
||||
wye/,0/,eks/,0.262688053894177098,0.641593543645736508/
|
||||
eks/,1/,zee/,0.715431942006308552,0.827614412562742041/
|
||||
zee/,2/,zee/,0.009737410587136359,0.923068348748175560/
|
||||
zee/,3/,pan/,0.803142013402256216,0.000047786161325772/
|
||||
zee/,4/,hat/,0.573903236805416328,0.676537984365847889/
|
||||
|
||||
mlr --csv -N reorder -f 5,4,3,2,1 ./reg_test/input/multi-sep.csv-crlf
|
||||
y/,x/,i/,b/,a/
|
||||
0.262688053894177098,0.641593543645736508/,0/,eks/,wye/
|
||||
0.715431942006308552,0.827614412562742041/,1/,zee/,eks/
|
||||
0.009737410587136359,0.923068348748175560/,2/,zee/,zee/
|
||||
0.803142013402256216,0.000047786161325772/,3/,pan/,zee/
|
||||
0.573903236805416328,0.676537984365847889/,4/,hat/,zee/
|
||||
|
||||
|
||||
================================================================
|
||||
HET-CSV INPUT
|
||||
|
|
|
|||
|
|
@ -5164,6 +5164,9 @@ run_mlr --implicit-csv-header --icsv --ifs , --opprint cut -x -f 2 $indir/mult
|
|||
run_mlr --icsv --ifs /, --opprint cut -x -f b $indir/multi-sep.csv-crlf
|
||||
run_mlr --implicit-csv-header --icsv --ifs /, --opprint cut -x -f 2 $indir/multi-sep.csv-crlf
|
||||
|
||||
run_mlr --csv -N reorder -f 1,3,2,5,4 $indir/multi-sep.csv-crlf
|
||||
run_mlr --csv -N reorder -f 5,4,3,2,1 $indir/multi-sep.csv-crlf
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
announce HET-CSV INPUT
|
||||
|
||||
|
|
|
|||
20
configure
vendored
20
configure
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for mlr 5.3.0.
|
||||
# Generated by GNU Autoconf 2.69 for mlr 5.4.0-dev.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
|
|
@ -587,8 +587,8 @@ MAKEFLAGS=
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='mlr'
|
||||
PACKAGE_TARNAME='mlr'
|
||||
PACKAGE_VERSION='5.3.0'
|
||||
PACKAGE_STRING='mlr 5.3.0'
|
||||
PACKAGE_VERSION='5.4.0-dev'
|
||||
PACKAGE_STRING='mlr 5.4.0-dev'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
|
|
@ -1310,7 +1310,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures mlr 5.3.0 to adapt to many kinds of systems.
|
||||
\`configure' configures mlr 5.4.0-dev to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
|
@ -1380,7 +1380,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of mlr 5.3.0:";;
|
||||
short | recursive ) echo "Configuration of mlr 5.4.0-dev:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
|
@ -1485,7 +1485,7 @@ fi
|
|||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
mlr configure 5.3.0
|
||||
mlr configure 5.4.0-dev
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
|
|
@ -1763,7 +1763,7 @@ cat >config.log <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by mlr $as_me 5.3.0, which was
|
||||
It was created by mlr $as_me 5.4.0-dev, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
|
@ -2630,7 +2630,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='mlr'
|
||||
VERSION='5.3.0'
|
||||
VERSION='5.4.0-dev'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
|
@ -12111,7 +12111,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by mlr $as_me 5.3.0, which was
|
||||
This file was extended by mlr $as_me 5.4.0-dev, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
|
@ -12181,7 +12181,7 @@ _ACEOF
|
|||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
mlr config.status 5.3.0
|
||||
mlr config.status 5.4.0-dev
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
|
|
|||
|
|
@ -527,6 +527,7 @@ OPTIONS
|
|||
of input files. Tip: combine with "label" to recreate
|
||||
missing headers.
|
||||
--headerless-csv-output Print only CSV data lines.
|
||||
-N Keystroke-saver for --implicit-csv-header --headerless-csv-output.
|
||||
|
||||
DOUBLE-QUOTING FOR CSV/CSVLITE OUTPUT
|
||||
--quote-all Wrap all fields in double quotes
|
||||
|
|
@ -2440,7 +2441,7 @@ SEE ALSO
|
|||
|
||||
|
||||
|
||||
2019-02-03 MILLER(1)
|
||||
2019-02-24 MILLER(1)
|
||||
</pre>
|
||||
</div>
|
||||
<p/>
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ OPTIONS
|
|||
of input files. Tip: combine with "label" to recreate
|
||||
missing headers.
|
||||
--headerless-csv-output Print only CSV data lines.
|
||||
-N Keystroke-saver for --implicit-csv-header --headerless-csv-output.
|
||||
|
||||
DOUBLE-QUOTING FOR CSV/CSVLITE OUTPUT
|
||||
--quote-all Wrap all fields in double quotes
|
||||
|
|
@ -2246,4 +2247,4 @@ SEE ALSO
|
|||
|
||||
|
||||
|
||||
2019-02-03 MILLER(1)
|
||||
2019-02-24 MILLER(1)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
.\" Title: mlr
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: ./mkman.rb
|
||||
.\" Date: 2019-02-03
|
||||
.\" Date: 2019-02-24
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "MILLER" "1" "2019-02-03" "\ \&" "\ \&"
|
||||
.TH "MILLER" "1" "2019-02-24" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Portability definitions
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
@ -418,6 +418,7 @@ output only.
|
|||
of input files. Tip: combine with "label" to recreate
|
||||
missing headers.
|
||||
--headerless-csv-output Print only CSV data lines.
|
||||
-N Keystroke-saver for --implicit-csv-header --headerless-csv-output.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
|
|
|
|||
|
|
@ -1658,6 +1658,7 @@ Relevant to CSV/CSV-lite input only:
|
|||
of input files. Tip: combine with "label" to recreate
|
||||
missing headers.
|
||||
--headerless-csv-output Print only CSV data lines.
|
||||
-N Keystroke-saver for --implicit-csv-header --headerless-csv-output.
|
||||
|
||||
Double-quoting for CSV output:
|
||||
--quote-all Wrap all fields in double quotes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue