@@ -638,6 +638,8 @@ <h2 id="more"><a class="header" href="#more"><code>more</code></a></h2>
638
638
coreutils. We do not aim for full compatibility with the < code > more</ code > utility from
639
639
< code > util-linux</ code > . Features from more modern pagers (like < code > less</ code > and < code > bat</ code > ) are
640
640
therefore welcomed.</ p >
641
+ < h2 id ="cut "> < a class ="header " href ="#cut "> < code > cut</ code > </ a > </ h2 >
642
+ < p > < code > cut</ code > can separate fields by whitespace (Space and Tab) with < code > -w</ code > flag. This feature is adopted from < a href ="https://www.freebsd.org/cgi/man.cgi?cut "> FreeBSD</ a > .</ p >
641
643
< div style ="break-before: page; page-break-before: always; "> </ div > < h1 id ="multi-call-binary "> < a class ="header " href ="#multi-call-binary "> Multi-call binary</ a > </ h1 >
642
644
< p > uutils includes a multi-call binary from which the utils can be invoked. This
643
645
reduces the binary size of the binary and can be useful for portability.</ p >
@@ -1945,7 +1947,7 @@ <h2 id="examples-14"><a class="header" href="#examples-14">Examples</a></h2>
1945
1947
< p > The examples are provided by the < a href ="https://tldr.sh "> tldr-pages project</ a > under the < a href ="https://github.com/tldr-pages/tldr/blob/main/LICENSE.md "> CC BY 4.0 License</ a > .</ p >
1946
1948
< p > Please note that, as uutils is a work in progress, some examples might fail.</ p >
1947
1949
</ blockquote >
1948
- < div style ="break-before: page; page-break-before: always; "> </ div > < h1 id ="cut "> < a class ="header " href ="#cut "> cut</ a > </ h1 >
1950
+ < div style ="break-before: page; page-break-before: always; "> </ div > < h1 id ="cut-1 "> < a class ="header " href ="#cut-1 "> cut</ a > </ h1 >
1949
1951
< div class ="additional ">
1950
1952
< div class ="platforms ">
1951
1953
< i class ="fa fa-brands fa-linux "> </ i >
@@ -1955,7 +1957,7 @@ <h2 id="examples-14"><a class="header" href="#examples-14">Examples</a></h2>
1955
1957
< div class ="version "> v0.0.16
1956
1958
</ div >
1957
1959
</ div >
1958
- < pre > < code > cut [-d] [-s] [-z] [--output-delimiter] ((-f|-b|-c) {{sequence}}) {{sourcefile}}+
1960
+ < pre > < code > cut [-d|-w ] [-s] [-z] [--output-delimiter] ((-f|-b|-c) {{sequence}}) {{sourcefile}}+
1959
1961
</ code > </ pre >
1960
1962
< p > Prints specified byte or field columns from each line of stdin or the input files</ p >
1961
1963
< h2 id ="options-17 "> < a class ="header " href ="#options-17 "> Options</ a > </ h2 >
@@ -1971,6 +1973,10 @@ <h2 id="options-17"><a class="header" href="#options-17">Options</a></h2>
1971
1973
< dd >
1972
1974
< p > specify the delimiter character that separates fields in the input source. Defaults to Tab.</ p >
1973
1975
</ dd >
1976
+ < dt > < code > -w <WHITESPACE></ code > </ dt >
1977
+ < dd >
1978
+ < p > Use any number of whitespace (Space, Tab) to separate fields in the input source (FreeBSD extension).</ p >
1979
+ </ dd >
1974
1980
< dt > < code > --fields=<LIST></ code > , < code > -f <LIST></ code > </ dt >
1975
1981
< dd >
1976
1982
< p > filter field columns from the input source</ p >
@@ -2056,6 +2062,11 @@ <h2 id="options-17"><a class="header" href="#options-17">Options</a></h2>
2056
2062
--delimiter (-d) option. Setting the delimiter is optional.
2057
2063
If not set, a default delimiter of Tab will be used.
2058
2064
2065
+ If the -w option is provided, fields will be separated by any number
2066
+ of whitespace characters (Space and Tab). The output delimiter will
2067
+ be a Tab unless explicitly specified. Only one of -d or -w option can be specified.
2068
+ This is an extension adopted from FreeBSD.
2069
+
2059
2070
Optionally Filter based on delimiter
2060
2071
If the --only-delimited (-s) flag is provided, only lines which
2061
2072
contain the delimiter will be printed
@@ -2318,25 +2329,25 @@ <h2 id="options-19"><a class="header" href="#options-19">Options</a></h2>
2318
2329
nofollow do not follow system links.
2319
2330
</ code > </ pre >
2320
2331
< h2 id ="examples-17 "> < a class ="header " href ="#examples-17 "> Examples</ a > </ h2 >
2321
- < p > Make a bootable USB drive from an isohybrid file (such like < code > archlinux-xxx.iso</ code > ) and show the progress :</ p >
2322
- < pre > < code class ="language-shell "> dd if={{file.iso}} of=/dev/{{usb_drive}} status=progress
2332
+ < p > Make a bootable USB drive from an isohybrid file (such like < code > archlinux-xxx.iso</ code > ):</ p >
2333
+ < pre > < code class ="language-shell "> dd if={{path/to/ file.iso}} of=/dev/{{usb_drive}}
2323
2334
</ code > </ pre >
2324
- < p > Clone a drive to another drive with 4 MiB block, ignore error and show progress :</ p >
2325
- < pre > < code class ="language-shell "> dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs=4M conv=noerror status=progress
2335
+ < p > Clone a drive to another drive with 4 MiB block and ignore error :</ p >
2336
+ < pre > < code class ="language-shell "> dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs={{4194304}} conv={{ noerror}}
2326
2337
</ code > </ pre >
2327
2338
< p > Generate a file of 100 random bytes by using kernel random driver:</ p >
2328
- < pre > < code class ="language-shell "> dd if=/dev/urandom of={{random_file}} bs=100 count=1
2339
+ < pre > < code class ="language-shell "> dd if=/dev/urandom of={{path/to/ random_file}} bs={{ 100}} count={{1}}
2329
2340
</ code > </ pre >
2330
2341
< p > Benchmark the write performance of a disk:</ p >
2331
- < pre > < code class ="language-shell "> dd if=/dev/zero of={{file_1GB}} bs=1024 count=1000000
2342
+ < pre > < code class ="language-shell "> dd if=/dev/zero of={{path/to/ file_1GB}} bs={{ 1024}} count={{ 1000000}}
2332
2343
</ code > </ pre >
2333
- < p > Generate a system backup into an IMG file and show the progress :</ p >
2334
- < pre > < code class ="language-shell "> dd if=/dev/{{ drive_device}} of={{path/to/file.img}} status=progress
2344
+ < p > Generate a system backup into an IMG file:</ p >
2345
+ < pre > < code class ="language-shell "> dd if={{ /dev/drive_device}} of={{path/to/file.img}}
2335
2346
</ code > </ pre >
2336
- < p > Restore a drive from an IMG file and show the progress :</ p >
2337
- < pre > < code class ="language-shell "> dd if={{path/to/file.img}} of=/dev/{{ drive_device}} status=progress
2347
+ < p > Restore a drive from an IMG file:</ p >
2348
+ < pre > < code class ="language-shell "> dd if={{path/to/file.img}} of={{ /dev/drive_device}}
2338
2349
</ code > </ pre >
2339
- < p > Check progress of an ongoing dd operation (Run this command from another shell):</ p >
2350
+ < p > Check the progress of an ongoing dd operation (run this command from another shell):</ p >
2340
2351
< pre > < code class ="language-shell "> kill -USR1 $(pgrep ^dd)
2341
2352
</ code > </ pre >
2342
2353
< blockquote >
0 commit comments