{"id":8504,"date":"2022-02-01T13:17:05","date_gmt":"2022-02-01T13:17:05","guid":{"rendered":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/"},"modified":"2022-02-01T13:17:05","modified_gmt":"2022-02-01T13:17:05","slug":"how-to-use-the-linux-cut-command","status":"publish","type":"post","link":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/","title":{"rendered":"How to Use the Linux cut Command"},"content":{"rendered":"<p> <a href=\"https:\/\/go.fiverr.com\/visit\/?bta=1052423&nci=17043\" Target=\"_Top\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/fiverr.ck-cdn.com\/tn\/serve\/?cid=40081059\"  width=\"601\" height=\"201\"><\/a>\n<\/p>\n<div>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage size-full wp-image-770699 \" data-pagespeed-lazy-data-srcset=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/11\/shutterstock_1278851809.png?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/11\/shutterstock_1278851809.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" data-sizes=\"auto, 400w, 1200w\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/11\/shutterstock_1278851809.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A terminal display on an open laptop screen\" width=\"1200\" height=\"675\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a href=\"https:\/\/www.shutterstock.com\/image-vector\/command-line-interface-cli-programming-language-1278851809\">fatmawati achmad zaenuri\/Shutterstock.com<\/a><\/span><\/figcaption><\/figure>\n<p>The Linux <code>cut<\/code> command lets you extract portions of text from files or data streams. It\u2019s especially useful for working with delimited data, such as <a href=\"https:\/\/www.howtogeek.com\/348960\/what-is-a-csv-file-and-how-do-i-open-it\/\">CSV files<\/a>. Here\u2019s what you need to know.<\/p>\n<h2 id=\"the-cut-command\">The cut Command<\/h2>\n<p>The <code>cut<\/code> command is a veteran of the <a href=\"https:\/\/www.howtogeek.com\/182649\/htg-explains-what-is-unix\/\">Unix<\/a> world, making its debut in 1982 as part of AT&amp;T System III UNIX. Its purpose in life is to snip out sections of text from files or streams, according to the criteria that you set. Its syntax is as simple as its purpose, but it is this joint simplicity that makes it so useful.<\/p>\n<p>In the time-honored UNIX way, by combining <code>cut<\/code> with other utilities <a href=\"https:\/\/www.howtogeek.com\/496056\/how-to-use-the-grep-command-on-linux\/\">such as <code>grep<\/code><\/a> you can create elegant and powerful solutions to challenging problems. While there are different versions of <code>cut<\/code>, we\u2019re going to discuss the standard GNU\/Linux version. Be aware that other versions, notably the <code>cut<\/code> found in <a href=\"https:\/\/www.howtogeek.com\/190773\/htg-explains-whats-the-difference-between-linux-and-bsd\/\">BSD<\/a> variants, don\u2019t include all the options described here.<\/p>\n<p>You can check which version is installed on your computer by issuing this command:<\/p>\n<pre>cut --version<\/pre>\n<p>If you see \u201cGNU coreutils\u201d in the output you\u2019re on the version we\u2019re going to describe in this article. All versions of <code>cut<\/code> have some of this functionality, but the Linux version has had enhancements added to it.<\/p>\n<h2 id=\"first-steps-with-cut\">First Steps With cut<\/h2>\n<p>Whether we\u2019re <a href=\"https:\/\/www.howtogeek.com\/438882\/how-to-use-pipes-on-linux\/\">piping information<\/a> into <code>cut<\/code> or using <code>cut<\/code> to <a href=\"https:\/\/www.howtogeek.com\/709838\/how-to-process-a-file-line-by-line-in-a-linux-bash-script\/\">read a file<\/a>, the commands we use are the same. Anything you can do to a stream of input with <code>cut<\/code> can be done on a line of text from a file, and\u00a0<em>vice versa<\/em>. We can tell <code>cut<\/code> to work with bytes, characters, or delimited fields.<\/p>\n<p>To select a single byte, we use the <code>-b<\/code> (byte) option and tell <code>cut<\/code> which byte or bytes we want. In this case, it is byte five. We\u2019re sending the string \u201chow-to geek\u201d into the <code>cut<\/code> command with a pipe, \u201c|\u201d, from <code>echo<\/code> .<\/p>\n<pre>echo 'how-to geek' | cut -b 5<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775827\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/1-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting a single byte with cut\" width=\"644\" height=\"95\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The fifth byte in that string is \u201ct\u201d, so <code>cut<\/code> responds by printing \u201ct\u201d in the terminal window.<\/p>\n<p>To specify a\u00a0<em>range<\/em>\u00a0we use a hyphen. To extract bytes 5 through to\u2014and including\u201411, we\u2019d issue this command:<\/p>\n<pre>echo 'how-to geek' | cut -b 5-11<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775828\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/2-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting a range of bytes with cut\" width=\"644\" height=\"95\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You can supply multiple single bytes or ranges by separating them with commas. To extract byte 5 and byte 11, use this command:<\/p>\n<pre>echo 'how-to geek' | cut -b 5,11<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775829\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/3-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting two bytes with cut\" width=\"644\" height=\"95\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To get the first letter of each word we can use this command:<\/p>\n<pre>echo 'how-to geek' | cut -b 1,5,8<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775830\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/4-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting three bytes with cut\" width=\"644\" height=\"95\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>If you use the hyphen without a\u00a0<em>first<\/em>\u00a0number, <code>cut<\/code> returns everything from position 1 up to the number. If you use the hyphen without a\u00a0<em>second<\/em>\u00a0number, <code>cut<\/code> returns everything from the first number to the end of the stream or line.<\/p>\n<pre>echo 'how-to geek' | cut -b -6<\/pre>\n<pre>echo 'how-to geek' | cut -b 8-<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775831\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/4-5.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting ranges of bytes with cut\" width=\"644\" height=\"130\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"using-cut-with-characters\">Using cut With Characters<\/h2>\n<p>Using <code>cut<\/code> with characters is pretty much the same as using it with bytes. In both cases, special care must be taken with complex characters. By using the <code>-c<\/code> (character) option, we tell <code>cut<\/code> to work in terms of characters, not bytes.<\/p>\n<pre>echo 'how-to geek' | cut -c 1,5,8<\/pre>\n<pre>echo 'how-to geek' | cut -c 8-11<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775832\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/5-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting characters and ranges of characters with cut\" width=\"644\" height=\"130\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>These work exactly as you\u2019d expect. But take a look at this example. It\u2019s a six-letter word, so asking <code>cut<\/code> to return the characters from one to six should return the entire word. But it doesn\u2019t. It\u2019s one character short. To see the whole word we have to ask for the characters from one to seven.<\/p>\n<pre>echo 'pi\u00f1ata' | cut -c 1-6<\/pre>\n<pre>echo 'pi\u00f1ata' | cut -c 1-7<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775833\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/6-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Special characters can take up more than one character\" width=\"644\" height=\"130\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The issue is the character \u201c\u00f1\u201d is actually made up out of two bytes. We can see this quite easily. We\u2019ve got a short <a href=\"https:\/\/www.howtogeek.com\/709838\/how-to-process-a-file-line-by-line-in-a-linux-bash-script\/\">text file<\/a> containing this line of text:<\/p>\n<pre>cat unicode.txt<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775834\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/7-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The contents of the short text file\" width=\"644\" height=\"95\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We\u2019ll <a href=\"https:\/\/www.howtogeek.com\/672345\/how-to-peek-inside-binary-files-from-the-linux-command-line\/\">examine that file<\/a> with the <code>hexdump<\/code> utility. Using the <code>-C<\/code> (canonical) option gives us a table of hexadecimal digits with the <a href=\"https:\/\/www.howtogeek.com\/howto\/41662\/how-to-create-your-own-custom-ascii-art-from-any-image\/\">ASCII equivalent<\/a> on the right. In the ASCII table, the \u201c\u00f1\u201d isn\u2019t shown, instead, there are dots representing <em>two<\/em> non-printable characters. These are the bytes highlighted in the <a href=\"https:\/\/www.howtogeek.com\/367621\/what-is-binary-and-why-do-computers-use-it\/\">hexadecimal<\/a> table.<\/p>\n<pre>hexdump -C unicode.txt<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775835\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/8-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Hexdump of the test text file\" width=\"644\" height=\"145\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>These two bytes are used by the displaying program\u2014in this case, <a href=\"https:\/\/www.howtogeek.com\/726559\/what-is-the-bash-shell-and-why-is-it-so-important-to-linux\/\">the Bash shell<\/a>\u2014to identify the \u201c\u00f1.\u201d Many <a href=\"https:\/\/www.howtogeek.com\/howto\/45765\/htg-explains-what-are-character-encodings-and-how-do-they-differ\/\">Unicode characters<\/a> use three or more bytes to represent a single character.<\/p>\n<p>If we ask for character 3 or character 4 we\u2019re shown the symbol for a non-printing character. If we ask for bytes 3 <em>and<\/em> 4, the shell interprets them as \u201c\u00f1.\u201d<\/p>\n<pre>echo 'pi\u00f1ata' | cut -c 3<\/pre>\n<pre>echo 'pi\u00f1ata' | cut -c 4<\/pre>\n<pre>echo 'pi\u00f1ata' | cut -c 3-4<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775836\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/9-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using cut to extract the characters that make up a special character\" width=\"644\" height=\"170\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"using-cut-with-delimited-data\">Using cut With Delimited Data<\/h2>\n<p>We can ask <code>cut<\/code> to split lines of text using a specified delimiter. By default, cut uses a tab character but it is easy to tell it to use whatever we want. The fields in the \u201c\/etc\/passwd\u201d file are separated by colons \u201c:\u201d, so we\u2019ll use that as our delimiter and extract some text.<\/p>\n<p>The portions of text between the delimiters are called\u00a0<em>fields<\/em>, and are referenced just like bytes or characters, but they\u2019re preceded by the <code>-f<\/code> (fields) option. You can leave a space between the \u201cf\u201d and the digit, or not.<\/p>\n<p>The first command uses the <code>-d<\/code> (delimiter) option to tell cut to use \u201c:\u201d as the delimiter. It\u2019s going to pull the first field out of each line in the \u201c\/etc\/passwd\u201d file. That\u2019ll be a long list so we\u2019re using <code>head<\/code> with the <code>-n<\/code> (number) option to show the first five responses only. The second command does the same thing but uses <code>tail<\/code> to show us the last five responses.<\/p>\n<pre>cut -d':' -f1 \/etc\/passwd | head -n 5<\/pre>\n<pre>cut -d':' -f2 \/etc\/passwd | tail -n 5<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775839\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/11-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting a range of fields from the \/etc\/passwd file\" width=\"644\" height=\"280\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To extract a selection of fields, list them as a comma-separated list. This command will extract fields one to three, five, and six.<\/p>\n<pre>cut -d':' -f1-3,5,6 \/etc\/passwd | tail -n 5<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775838\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/12-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting a range of fields from the \/etc\/passwd file\" width=\"644\" height=\"170\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>By including <code>grep<\/code> in the command, we can look for lines that include \u201c\/bin\/bash.\u201d The means we can list only those entries that have Bash as their default shell. That\u2019ll usually be the \u201cnormal\u201d user accounts. We\u2019ll ask for fields from one to six because the seventh field is the default shell field and we already know what that is\u2014we\u2019re searching for it.<\/p>\n<pre>grep \"\/bin\/bash\" \/etc\/passwd | cut -d':' -f1-6<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775840\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/13-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Extracting fields one to six from the \/etc\/passwd file\" width=\"644\" height=\"130\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Another way to include all fields apart from one is to use the <code>--complement<\/code> option. This inverts the field selection and shows everything that\u00a0<em>hasn\u2019t<\/em>\u00a0been requested. Let\u2019s repeat the last command but only ask for field seven. Then we\u2019ll run that command again with the <code>--complement<\/code> option.<\/p>\n<pre>grep \"\/bin\/bash\" \/etc\/passwd | cut -d':' -f7<\/pre>\n<pre>grep \"\/bin\/bash\" \/etc\/passwd | cut -d':' -f7 --complement<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775841\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/14-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using the --complement option to invert a field selection\" width=\"644\" height=\"175\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The first command finds a list of entries, but field seven gives us nothing to distinguish between them, so we don\u2019t know who the entries refer to. In the second command, by adding the <code>--complement<\/code> option we get everything except field seven.<\/p>\n<h2 id=\"piping-cut-into-cut\">Piping cut Into cut<\/h2>\n<p>Sticking with the \u201c\/etc\/passwd\u201d file, let\u2019s extract field five. This is the actual name of the user who <a href=\"https:\/\/www.howtogeek.com\/67987\/htg-explains-how-do-linux-file-permissions-work\/\">owns the user account<\/a>.<\/p>\n<pre>grep \"\/bin\/bash\" \/etc\/passwd | cut -d':' -f5<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775845\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/15-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The fifth field from the \/etc\/passwd file can have comma separated subfields\" width=\"644\" height=\"130\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The fifth field has subfields separated by commas. They\u2019re rarely populated so they show up as a line of commas.<\/p>\n<p>We can remove the commas by piping the output of the previous command into another invocation of <code>cut<\/code> . The second instance of <code>cut<\/code>\u00a0uses the comma \u201c,\u201d as its delimiter. The <code>-s<\/code> (only delimited) option tells <code>cut<\/code> to suppress results that don\u2019t have the delimiter in them at all.<\/p>\n<pre>grep \"\/bin\/bash\" \/etc\/passwd | cut -d':' -s -f5 | cut -d',' -s -f1<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775847\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/16-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Piping cut into cut to deal with two types of delimiter\" width=\"644\" height=\"123\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Because the root entry doesn\u2019t have comma subfields in the fifth field it is suppressed, and we get the results we\u2019re after\u2014a list of the names of the \u201creal\u201d users configured on this computer.<\/p>\n<p><strong>RELATED:<\/strong> <a href=\"https:\/\/www.howtogeek.com\/67987\/htg-explains-how-do-linux-file-permissions-work\/\"><strong><em>How Do Linux File Permissions Work?<\/em><\/strong><\/a><\/p>\n<h2 id=\"the-output-delimiter\">The Output Delimiter<\/h2>\n<p>We\u2019ve got a small file with some Comma Separated Values in them. The fields in this dummy data are:<\/p>\n<ul>\n<li><strong>ID<\/strong>: A database ID number<\/li>\n<li><strong>First<\/strong>: The first name of the subject.<\/li>\n<li><strong>Last<\/strong>: The last name of the subject.<\/li>\n<li><strong>email<\/strong>: Their email address.<\/li>\n<li><strong>IP Address<\/strong>: Their <a href=\"https:\/\/www.howtogeek.com\/341307\/how-do-ip-addresses-work\/\">IP Address<\/a>.<\/li>\n<li><strong>Brand<\/strong>: The brand of motor vehicle they drive.<\/li>\n<li><strong>Model<\/strong>: The model of motor vehicle they drive.<\/li>\n<li><strong>Year<\/strong>: The year their motor vehicle was built.<\/li>\n<\/ul>\n<pre>cat small.csv<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775846\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/10-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A text file of dummy CSV data\" width=\"644\" height=\"166\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>If we tell cut to use the comma as the delimiter we can extract fields just like we did before. Sometimes you\u2019ll have a requirement to extract data from a file, but you don\u2019t want to have the field delimiter included in the results. Using the <code>--output-delimiter<\/code> we can tell cut what character\u2014or in fact, character\u00a0<em>sequence<\/em>\u2014to use instead of the actual delimiter.<\/p>\n<pre>cut -d ',' -f 2,3 small.csv<\/pre>\n<pre>cut -d ',' -f 2,3 small.csv --output-delimiter=\" \"<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775848\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/17-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using the --output-delimiter to change the delimiter in the results\" width=\"644\" height=\"280\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The second command tells <code>cut<\/code> to replace the commas with spaces.<\/p>\n<p>We can take this further and use this feature to convert the output to a vertical list. This command uses a new line character as the output delimiter. Note the \u201c$\u201d that we need to include to have the newline character acted upon, and not interpreted as a literal sequence of two characters.<\/p>\n<p>We\u2019ll use <code>grep<\/code> to filter out the entry for Morgana Renwick, and ask <code>cut<\/code> to print all fields from field two to the end of the record, and to use a newline character as the output delimiter.<\/p>\n<pre>grep 'renwick' small.csv | cut -d ',' -f2- --output-delimiter=$''<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-775849\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2021\/12\/18-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Converting a record to a list by using a newline character as the output delimiter\" width=\"644\" height=\"201\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"an-oldie-but-goldie\">An Oldie but Goldie<\/h2>\n<p>At the time of writing, the little cut <a href=\"https:\/\/www.howtogeek.com\/412055\/37-important-linux-commands-you-should-know\/\">command<\/a> is approaching its 40th birthday, and we\u2019re still using it and writing about it today. I suppose cutting up text today is the same as it was 40 years ago. That is, a lot easier when you have the right tool to hand.<\/p>\n<p><strong>RELATED:<\/strong> <a href=\"https:\/\/www.howtogeek.com\/412055\/37-important-linux-commands-you-should-know\/\"><strong><em>37 Important Linux Commands You Should Know<\/em><\/strong><\/a><\/p>\n<\/div>\n<iframe data-lazy=\"true\" data-src=\"https:\/\/www.fiverr.com\/gig_widgets?id=U2FsdGVkX18x7XQvttUTrv1oEqmGNGTgvvCUiUoJ\/AP4z\/UyMz8lXGOLpu15jIMxBbTR0gmD5uBoFvhC4KWeALQRp3h\/X\/AwcVD0K8Wj9H\/ZzYKzcCNHosB9oS4SCJJFWiN85P9ICAc4OgCoE\/wHKIY7CDkf2\/DQ1vqGvk4smVe5cRDEmrLPCWi4FC8p40VUhSmWQ5udCm0zoJtorgWv3vbDQw0kKYkwn39ozAnQXDe+YvWMxkLFWA+O3TFwkJvdkIK+\/AUSnRssPKt5WHY0FhNOxnSPcLslEL4G4\/RfP95ve99U+kRnDy3X+KtzdQLY+u935ghON\/o3UE4IMv9oN6JX9RnxzL\/LRcOgnHigxStSGPKsZYtnz8RWNVT\/rOLAibqiWJadC5MYHRbekF3eg6FOGrQGkXYbsn0+a5aovnlLCbLwIqY9fcS17UX8J235iQ6cdmHNbrPeS84CMm34RA==&affiliate_id=1052423&strip_google_tagmanager=true\" loading=\"lazy\" data-with-title=\"true\" class=\"fiverr_nga_frame\" frameborder=\"0\" height=\"350\" width=\"100%\" referrerpolicy=\"no-referrer-when-downgrade\" data-mode=\"random_gigs\" onload=\" var frame = this; var script = document.createElement('script'); script.addEventListener('load', function() { window.FW_SDK.register(frame); }); script.setAttribute('src', 'https:\/\/www.fiverr.com\/gig_widgets\/sdk'); document.body.appendChild(script); \" ><\/iframe>\n<br \/><a href=\"https:\/\/www.howtogeek.com\/775824\/how-to-use-the-linux-cut-command\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>fatmawati achmad zaenuri\/Shutterstock.com The Linux cut command lets you extract portions of text from files or data streams. It\u2019s especially useful for working with delimited&#8230;<\/p>\n","protected":false},"author":1,"featured_media":8505,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-8504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-universe"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use the Linux cut Command - mailinvest.blog<\/title>\n<meta name=\"description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use the Linux cut Command - mailinvest.blog\" \/>\n<meta property=\"og:description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/\" \/>\n<meta property=\"og:site_name\" content=\"mailinvest.blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/freelanceracademic\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-01T13:17:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/02\/shutterstock_1278851809.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2392\" \/>\n\t<meta property=\"og:image:height\" content=\"1342\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin@mailinvest.blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@mailinvest.blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/\"},\"author\":{\"name\":\"admin@mailinvest.blog\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\"},\"headline\":\"How to Use the Linux cut Command\",\"datePublished\":\"2022-02-01T13:17:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/\"},\"wordCount\":1464,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/shutterstock_1278851809.png\",\"articleSection\":[\"Tech Universe\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/\",\"name\":\"How to Use the Linux cut Command - mailinvest.blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/shutterstock_1278851809.png\",\"datePublished\":\"2022-02-01T13:17:05+00:00\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#primaryimage\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/shutterstock_1278851809.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/shutterstock_1278851809.png\",\"width\":2392,\"height\":1342},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/02\\\/01\\\/how-to-use-the-linux-cut-command\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mailinvest.blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use the Linux cut Command\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"name\":\"mailinvest.blog\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mailinvest.blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\",\"name\":\"mailinvest\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"width\":1000,\"height\":1000,\"caption\":\"mailinvest\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/freelanceracademic\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\",\"name\":\"admin@mailinvest.blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"caption\":\"admin@mailinvest.blog\"},\"sameAs\":[\"https:\\\/\\\/mailinvest.blog\",\"admin@mailinvest.blog\"],\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/author\\\/adminmailinvest-blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use the Linux cut Command - mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/","og_locale":"en_US","og_type":"article","og_title":"How to Use the Linux cut Command - mailinvest.blog","og_description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","og_url":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/","og_site_name":"mailinvest.blog","article_publisher":"https:\/\/www.facebook.com\/freelanceracademic\/","article_published_time":"2022-02-01T13:17:05+00:00","og_image":[{"width":2392,"height":1342,"url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/02\/shutterstock_1278851809.png","type":"image\/png"}],"author":"admin@mailinvest.blog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin@mailinvest.blog","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#article","isPartOf":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/"},"author":{"name":"admin@mailinvest.blog","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4"},"headline":"How to Use the Linux cut Command","datePublished":"2022-02-01T13:17:05+00:00","mainEntityOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/"},"wordCount":1464,"commentCount":0,"publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/02\/shutterstock_1278851809.png","articleSection":["Tech Universe"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/","url":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/","name":"How to Use the Linux cut Command - mailinvest.blog","isPartOf":{"@id":"https:\/\/mailinvest.blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#primaryimage"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/02\/shutterstock_1278851809.png","datePublished":"2022-02-01T13:17:05+00:00","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","breadcrumb":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#primaryimage","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/02\/shutterstock_1278851809.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/02\/shutterstock_1278851809.png","width":2392,"height":1342},{"@type":"BreadcrumbList","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/02\/01\/how-to-use-the-linux-cut-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mailinvest.blog\/"},{"@type":"ListItem","position":2,"name":"How to Use the Linux cut Command"}]},{"@type":"WebSite","@id":"https:\/\/mailinvest.blog\/#website","url":"https:\/\/mailinvest.blog\/","name":"mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mailinvest.blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mailinvest.blog\/#organization","name":"mailinvest","url":"https:\/\/mailinvest.blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","width":1000,"height":1000,"caption":"mailinvest"},"image":{"@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/freelanceracademic\/"]},{"@type":"Person","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4","name":"admin@mailinvest.blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","caption":"admin@mailinvest.blog"},"sameAs":["https:\/\/mailinvest.blog","admin@mailinvest.blog"],"url":"https:\/\/mailinvest.blog\/index.php\/author\/adminmailinvest-blog\/"}]}},"_links":{"self":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/8504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/comments?post=8504"}],"version-history":[{"count":0,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/8504\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media\/8505"}],"wp:attachment":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media?parent=8504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/categories?post=8504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/tags?post=8504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}