[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cut -DF
From: |
Rob Landley |
Subject: |
Re: cut -DF |
Date: |
Fri, 7 Jan 2022 12:38:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 1/7/22 9:06 AM, Pádraig Brady wrote:
> I'm not sure about the --allow-duplicates long option for -D,
> as the duplicate aspect is not the only or even the most important
> aspect of that mode. I do like it matches the "-D", though I
> don't like "-D" was used for this as I mentioned previously.
> Maybe -D, --definitive-list would be better?
For reference:
$ toybox --help cut
Toybox 0.8.6 multicall binary: https://landley.net/toybox (see toybox --help)
usage: cut [-Ds] [-bcCfF LIST] [-dO DELIM] [FILE...]
Print selected parts of lines from each FILE to standard output.
Each selection LIST is comma separated, either numbers (counting from 1)
or dash separated ranges (inclusive, with X- meaning to end of line and -X
from start). By default selection ranges are sorted and collated, use -D
to prevent that.
-b Select bytes
-c Select UTF-8 characters
-C Select unicode columns
-d Use DELIM (default is TAB for -f, run of whitespace for -F)
-D Don't sort/collate selections or match -fF lines without delimiter
-f Select fields (words) separated by single DELIM character
-F Select fields separated by DELIM regex
-O Output delimiter (default one space for -F, input delim for -f)
-s Skip lines without delimiters
$ busybox --help cut
BusyBox v1.36.0.git (2022-01-05 17:54:25 CST) multi-call binary.
Usage: cut [OPTIONS] [FILE]...
Print selected fields from FILEs to stdout
-b LIST Output only bytes from LIST
-c LIST Output only characters from LIST
-d SEP Field delimiter for input (default -f TAB, -F run of whitespace)
-O SEP Field delimeter for output (default = -d for -f, one space for
-F)
-D Don't sort/collate sections or match -fF lines without delimeter
-f LIST Print only these fields (-d is single char)
-F LIST Print only these fields (-d is regex)
-s Output only lines containing delimiter
-n Ignored
The original mnemonic for -D was "Don't". :)
Rob
- cut -DF, Rob Landley, 2022/01/05
- Re: cut -DF, Shehu Dikko, 2022/01/15
- Re: cut -DF, Pádraig Brady, 2022/01/15
- Re: cut -DF, Shehu Dikko, 2022/01/15
- Re: cut -DF, Rob Landley, 2022/01/15
- Re: cut -DF, Assaf Gordon, 2022/01/25
- Re: cut -DF, Rob Landley, 2022/01/25
- Re: cut -DF, Pádraig Brady, 2022/01/25
- Re: cut -DF, Rob Landley, 2022/01/25
- Re: cut -DF, Pádraig Brady, 2022/01/25