How To Install Cut In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Cut In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

cut

Cut out fields from STDIN or files.

Maintainer: Michael Stone



Section: utils

Install cut

  • Debian apt-get install coreutils Click to copy
  • Ubuntu apt-get install coreutils Click to copy
  • Alpine OS apk add coreutils Click to copy
  • Arch Linux pacman -S coreutils Click to copy
  • Kali Linux apt-get install coreutils Click to copy
  • CentOS yum install coreutils Click to copy
  • Fedora dnf install coreutils Click to copy
  • Raspbian apt-get install coreutils Click to copy
  • macOS brew install coreutils Click to copy

Cut out fields from STDIN or files.

How to use cut?

Below are few example commands for cut that you can use in the terminal.

Cut out the first sixteen characters of each line of STDIN:
cut -c 1-16Click to copy
Cut out the first sixteen characters of each line of the given files:
cut -c 1-16 fileClick to copy
Cut out everything from the 3rd character to the end of each line:
cut -c 3-Click to copy
Cut out the fifth field of each line, using a colon as a field delimiter (default delimiter is tab):
cut -d':' -f5Click to copy
Cut out the 2nd and 10th fields of each line, using a semicolon as a delimiter:
cut -d';' -f2,10Click to copy
Cut out the fields 3 through to the end of each line, using a space as a delimiter:
cut -d' ' -f3-Click to copy
Install the latest version of cut in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the cut just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of cut from the respository and install it in your computer/server.