Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux cut Command Study Notes     - Debian 8 Jessie install LAMP server tutorial (Server)

- Some common regular expressions (Linux)

- A list of the basics of Python, Ganso, Dictionary (Programming)

- Why JavaScript basic types can invoke methods (Programming)

- RPM package fabrication method (Linux)

- Linux GCC 5.1.0 compiler installation (Linux)

- Linux asynchronous read documents by AIO (Programming)

- CentOS6.0 successful installation and configuration OpenCV (Linux)

- ORA-28000 the account is locked fault simulation (Database)

- The virtual memory (Linux)

- Java object serialization (Programming)

- CentOS and RHEL to install IPython 0.11 (Linux)

- Oracle partition table data migration, process management automation (Database)

- Ubuntu 14.04 / 13.10 users how to install Ubuntu Touch core applications (Linux)

- OpenStack Folsom create an instance of the failure of the Quota Fixed_IP articles (Server)

- Oracle inverted reverse function (Database)

- MySQL 5.6 use GTIDs build the master database (Database)

- Five kinds of IO Model under Linux (Programming)

- How to monitor network usage by nload in Linux (Linux)

- QEMU code analysis: BIOS loading process (Linux)

  Linux cut Command Study Notes
  Add Date : 2018-11-21      
  Cut command is one of the most commonly used commands Linux.

As its name suggests, cut job is to "cut", specifically, is in charge of cutting data in a file. cut each act is a processing target, and sed this mechanism is the same.

Cut cut metric command in three ways:

Byte Cut: -b (byte)
Cut by character: -c (character)
By Shear: -f (field) to specify the time domain by shear delimiter, the default delimiter is a tab (\ t).

In addition, cut command also supports a range of digital representation,

      N N'th byte, character or field, counted from 1

      N- from N'th byte, character or field, to end of line

      N-M from N'th to M'th (included) byte, character or field

      -M From first to M'th (included) byte, character or field

Examples given to illustrate:

Cut in bytes
date | cut -b 1-5
date | cut -b 1-6
date | cut -b 1-7
Year 2014

As can be seen from the above example the Chinese character "years" accounted for 3 bytes

In accordance with the character cut

October 10, 2014 Friday 14:48:16 CST
date | cut -c 1,3,4

Positioning a plurality of separated by commas

In accordance with Shear

October 10, 2014 Friday 14:46:09 CST
date | cut -d "" -f 4,5
Friday 14:46:12

-d delimiter and indicates delimiter must be a single character.
- Install Krita 2.8 on Ubuntu 13.10 / 12.04 / 12.10 (Linux)
- Linux server disk expansion and Oracle tablespace file migration operations (Database)
- CentOS 6.6 shortcut command execution (Linux)
- Bash environment is automatically install and initialize oh-my-zsh & autojump zsh (Linux)
- Use SecureCRT to transfer files between local and remote hosts (Linux)
- Linux environment has been running Tomcat how to deploy the new Tomcat (Server)
- Deploy OpenStack Juno on Ubuntu 14.04 (Linux)
- Source code compiled by the installation program under Linux (Linux)
- Ubuntu installed racing game Speed Dreams 2.1 (Linux)
- ADSL router to defend their own network security methods (Linux)
- C ++ multithreading and critical resource instance (Programming)
- KVM virtualization of nested virtualization (Linux)
- Manager Docker browser (Server)
- Slice MyCAT common fragmentation rules of enumeration (Database)
- Java NIO1: I / O model overview (Programming)
- File permissions under Linux (Linux)
- An Analysis of the C Algorithm for Calculating the Number of Days Between Date (Programming)
- The Java Properties class action (Programming)
- Linux install deploy Ansible (Linux)
- Ubuntu installed Komodo editor by PPA (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.