mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
mlr --csv --rs lf emphasis
This commit is contained in:
parent
e2ccc39c70
commit
cdedcf11e2
13 changed files with 46 additions and 15 deletions
|
|
@ -7,7 +7,7 @@ indices. Examples:
|
|||
|
||||
```
|
||||
% mlr --csv cut -f hostname,uptime mydata.csv
|
||||
% mlr --csv filter '$status != "down" && $upsec >= 10000' *.csv
|
||||
% mlr --csv --rs lf filter '$status != "down" && $upsec >= 10000' *.csv
|
||||
% mlr --nidx put '$sum = $7 + 2.1*$8' *.dat
|
||||
% grep -v '^#' /etc/group | mlr --ifs : --nidx --opprint label group,pass,gid,member then sort -f group
|
||||
% mlr join -j account_id -f accounts.dat then group-by account_name balances.dat
|
||||
|
|
|
|||
|
|
@ -304,8 +304,12 @@ static void main_usage_data_format_options(FILE* o, char* argv0) {
|
|||
fprintf(o, " The --right option right-justifies all fields for PPRINT output format.\n");
|
||||
fprintf(o, " The --xvright option right-justifies values for XTAB format.\n");
|
||||
fprintf(o, " -p is a keystroke-saver for --nidx --fs space --repifs\n");
|
||||
fprintf(o, "\n");
|
||||
fprintf(o, " Examples: --csv for CSV-formatted input and output; --idkvp --opprint for\n");
|
||||
fprintf(o, " DKVP-formatted input and pretty-printed output.\n");
|
||||
fprintf(o, "\n");
|
||||
fprintf(o, " Please use \"%s --csv --rs lf\" for for native Un*x (linefeed-terminated) CSV files.\n",
|
||||
argv0);
|
||||
}
|
||||
|
||||
static void main_usage_compressed_data_options(FILE* o, char* argv0) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ TOP OF LIST
|
|||
* rename mlr_selected_values_from_record to mlr_reference_selected_values_from_record
|
||||
! --rs lf splatters
|
||||
- termcvt flins & rework that page
|
||||
* link to release notes from release-docs page
|
||||
|
||||
* light edit on utf8 page
|
||||
* --mmap/--no-mmap @ mlr -h
|
||||
* debian screenshot
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
POKI_PUT_TOC_HERE
|
||||
|
||||
<h1>Number one FAQ</h1>
|
||||
|
||||
<b>
|
||||
Please use <tt>mlr --csv --rs lf</tt> for native Un*x (linefeed-terminated) CSV files.
|
||||
</b>
|
||||
|
||||
<h1>No output at all</h1>
|
||||
|
||||
<p/>Check the line-terminators of the data, e.g. with the command-line
|
||||
|
|
|
|||
|
|
@ -87,7 +87,12 @@ POKI_PUT_LINK_FOR_PAGE(reference.html)HERE.)
|
|||
|
||||
<p/>Miller’s <tt>--csv</tt> flag supports RFC-4180 CSV (<a href="https://tools.ietf.org/html/rfc4180">
|
||||
https://tools.ietf.org/html/rfc4180</a>). This includes CRLF line-terminators by default, regardless
|
||||
of platform. You can use <tt>mlr --csv --rs lf</tt> for native Un*x (LF-terminated) CSV files.
|
||||
of platform.
|
||||
|
||||
<p/>
|
||||
<b>
|
||||
Please use <tt>mlr --csv --rs lf</tt> for native Un*x (linefeed-terminated) CSV files.
|
||||
</b>
|
||||
|
||||
<p/>The RFC says, somewhat briefly, that “there may be a header
|
||||
line”. Miller’s <tt>--implicit-csv-header</tt> option allows you to
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
<p/>
|
||||
These are full docsets as of the specified release.
|
||||
Please see
|
||||
For release notes per se — what changed from one release to the next — please see the following:
|
||||
<p/>
|
||||
<a href="https://github.com/johnkerl/miller/tags">https://github.com/johnkerl/miller/tags</a>
|
||||
<p/>
|
||||
for release notes per se — what changed from one release to the next.
|
||||
|
||||
<p/>
|
||||
The following are full docsets as of the specified release:
|
||||
|
||||
<ul>
|
||||
|
||||
<li/> <a href="./index.html">Head</a>
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ Miller commands were run with pretty-print-tabular output format.
|
|||
<!-- BODY COPIED FROM content-for-faq.html BY poki -->
|
||||
<div class="pokitoc">
|
||||
<center><b>Contents:</b></center>
|
||||
• <a href="#Number_one_FAQ">Number one FAQ</a><br/>
|
||||
• <a href="#No_output_at_all">No output at all</a><br/>
|
||||
• <a href="#Fields_not_selected">Fields not selected</a><br/>
|
||||
• <a href="#Diagnosing_delimiter_specifications">Diagnosing delimiter specifications</a><br/>
|
||||
|
|
@ -146,6 +147,12 @@ Miller commands were run with pretty-print-tabular output format.
|
|||
</div>
|
||||
<p/>
|
||||
|
||||
<a id="Number_one_FAQ"/><h1>Number one FAQ</h1>
|
||||
|
||||
<b>
|
||||
Please use <tt>mlr --csv --rs lf</tt> for native Un*x (linefeed-terminated) CSV files.
|
||||
</b>
|
||||
|
||||
<a id="No_output_at_all"/><h1>No output at all</h1>
|
||||
|
||||
<p/>Check the line-terminators of the data, e.g. with the command-line
|
||||
|
|
|
|||
|
|
@ -365,7 +365,12 @@ CSV, use <tt>--ifs tab --ofs comma</tt>, etc. (See also
|
|||
|
||||
<p/>Miller’s <tt>--csv</tt> flag supports RFC-4180 CSV (<a href="https://tools.ietf.org/html/rfc4180">
|
||||
https://tools.ietf.org/html/rfc4180</a>). This includes CRLF line-terminators by default, regardless
|
||||
of platform. You can use <tt>mlr --csv --rs lf</tt> for native Un*x (LF-terminated) CSV files.
|
||||
of platform.
|
||||
|
||||
<p/>
|
||||
<b>
|
||||
Please use <tt>mlr --csv --rs lf</tt> for native Un*x (linefeed-terminated) CSV files.
|
||||
</b>
|
||||
|
||||
<p/>The RFC says, somewhat briefly, that “there may be a header
|
||||
line”. Miller’s <tt>--implicit-csv-header</tt> option allows you to
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
% mlr --csv cut -f hostname,uptime mydata.csv
|
||||
% mlr --csv filter '$status != "down" && $upsec >= 10000' *.csv
|
||||
% mlr --csv --rs lf filter '$status != "down" && $upsec >= 10000' *.csv
|
||||
% mlr --nidx put '$sum = $7 + 2.1*$8' *.dat
|
||||
% grep -v '^#' /etc/group | mlr --ifs : --nidx --opprint label group,pass,gid,member then sort -f group
|
||||
% mlr join -j account_id -f accounts.dat then group-by account_name balances.dat
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ positional indices. For example:
|
|||
<div class="pokipanel">
|
||||
<pre>
|
||||
% mlr --csv cut -f hostname,uptime mydata.csv
|
||||
% mlr --csv filter '$status != "down" && $upsec >= 10000' *.csv
|
||||
% mlr --csv --rs lf filter '$status != "down" && $upsec >= 10000' *.csv
|
||||
% mlr --nidx put '$sum = $7 + 2.1*$8' *.dat
|
||||
% grep -v '^#' /etc/group | mlr --ifs : --nidx --opprint label group,pass,gid,member then sort -f group
|
||||
% mlr join -j account_id -f accounts.dat then group-by account_name balances.dat
|
||||
|
|
|
|||
|
|
@ -167,8 +167,11 @@ Please use "mlr --help-all-functions" or "mlr -f" for help on all functions.
|
|||
The --right option right-justifies all fields for PPRINT output format.
|
||||
The --xvright option right-justifies values for XTAB format.
|
||||
-p is a keystroke-saver for --nidx --fs space --repifs
|
||||
|
||||
Examples: --csv for CSV-formatted input and output; --idkvp --opprint for
|
||||
DKVP-formatted input and pretty-printed output.
|
||||
|
||||
Please use "mlr --csv --rs lf" for for native Un*x (linefeed-terminated) CSV files.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
|
|
|
|||
|
|
@ -364,9 +364,12 @@ Data-format options, for input, output, or both:
|
|||
The --right option right-justifies all fields for PPRINT output format.
|
||||
The --xvright option right-justifies values for XTAB format.
|
||||
-p is a keystroke-saver for --nidx --fs space --repifs
|
||||
|
||||
Examples: --csv for CSV-formatted input and output; --idkvp --opprint for
|
||||
DKVP-formatted input and pretty-printed output.
|
||||
|
||||
Please use "mlr --csv --rs lf" for for native Un*x (linefeed-terminated) CSV files.
|
||||
|
||||
Compressed-data options:
|
||||
--prepipe {command} This allows Miller to handle compressed inputs. You can do
|
||||
without this for single input files, e.g. "gunzip < myfile.csv.gz | mlr ...".
|
||||
|
|
|
|||
|
|
@ -134,14 +134,13 @@ Miller commands were run with pretty-print-tabular output format.
|
|||
|
||||
<!-- BODY COPIED FROM content-for-release-docs.html BY poki -->
|
||||
<p/>
|
||||
These are full docsets as of the specified release.
|
||||
Please see
|
||||
For release notes per se — what changed from one release to the next — please see the following:
|
||||
<p/>
|
||||
<a href="https://github.com/johnkerl/miller/tags">https://github.com/johnkerl/miller/tags</a>.
|
||||
<p/>
|
||||
for release notes per se — what changed from one release to the next.
|
||||
<a href="https://github.com/johnkerl/miller/tags">https://github.com/johnkerl/miller/tags</a>
|
||||
|
||||
<p/>
|
||||
The following are full docsets as of the specified release:
|
||||
|
||||
<ul>
|
||||
|
||||
<li/> <a href="./index.html">Head</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue