Cut is a selection command that analyzes a piece of data and takes out what we want. In general, the selection of information is usually for "line" to analyze, not the entire information analysis.(1) The syntax format is:Cut [-bn] [file] or cut [-c] [file] or cut [-DF] [file]Instructions for useThe
Cut is a selection command that analyzes a piece of data and takes out what we want. In general, the selection of information is usually for "line" to analyze, not the entire information analysis.(1) The syntax format is:Cut [-bn] [file] or cut [-c] [file] or cut [-DF] [file]Instructions for useThe
-------------------------------------------------------------------------------------------"Cut Command"Cut [Options] File-F Column Number (--field extract the first few columns)-D delimiter (--delimiter splits columns by specified delimiter)VI User.txt(The default delimiter for the row separator is tab tab,cut is a ta
characters within a specified range(1) cut-c n1-n2 filename (n1 and N2 are specified to intercept the range of characters, N1 is the starting position, N2 is the cutoff location filename specified file name)Filename:number.txt10 1020 2014 1411 11Command: Cut-c 1-2 number.txtOutput:10201411Note: The contents of the file are Chinese characters, the character length in Un
Cut is a selection command that analyzes a piece of data and takes out what we want.1 syntax formatCut [-bn] [file] or cut [-c] [file] or cut [-DF] [file](1) Instructions for useThe cut command cuts bytes, characters, and fields f
excerpt from: http://blog.csdn.net/zsf8701/article/details/7718680Linux Cut Command detailedCut is a selection command that analyzes a piece of data and takes out what we want. In general, the selection of information is usually for "line" to analyze, not the entire information analysis.(1) The syntax format is: cut [-
One,cut command1,the Cut command is the command to intercept the line. First look at the man in the cut command parameter-b,--bytes=LIST selectonlythesebytes -c,--characters=list Selectonlythesecharacters-d,--delimiter=delim useDE
Cut [-bn] [file] or cut [-c] [file] or cut [-DF] [file]Instructions for useThe cut command cuts bytes, characters, and fields from each line of the file and writes those bytes, characters, and fields to standard output.If you do not specify a File parameter, the
Linux cut command learning notes
The cut command is also one of the most common commands in Linux.
As its name suggests, cut is used to cut data. Specifically, cut data is used in files
(1) Its grammatical format is:Cut [-bn] [file] or cut [-c] [file] or cut [-DF] [file]
Instructions for useThe cut command cuts bytes, characters, and fields from each line of the file and writes the bytes, characters, and fields to the standard output.If you do not specify a File parameter, the
Cut commandCut is a character selection command that cuts bytes, characters, and fields from each line of a file and converts those bytes, characters, and fields to standard output.The syntax format is:Cut [BCDFN] ... file ...Main parameters-B: Split in bytes. These byte locations will ignore multibyte character boundaries unless the-n flag is also specified.-C: Split in characters.-D: Custom delimiter, def
understand it, that is, filter what we don't want, and the rest we want.Maybe you have read this command.$ Cat names | lessIf you do not understand what "|" is, remember that this is a writing method, and "|" is called a pipeline. Next, we will explain it.In order to reflect the effect of the filter, we first use the WHO (introduced in the previous section) to view it.$ WhoFarseer tty7 (: 0)Farseer pts/0 (: 0.0)User tty9 (: 20)If you only want a user
Choosing a command is to analyze a piece of data and take out what we want. or by analyzing the keywords, get the line we want! In general, the selection command is usually for a row of data for analysis, not the entire information analysis.CutThe Cut command can select a segment of a piece of information to process a
--Sort by file size shows the first 100 rows showing the last five columnsLl-sh|head-n 100|cut-d '-F 5-First, the basic grammarCut is a selection command that, in the unit of behavior, divides the rows into fields with the specified delimiter and selects the required fields.1. Syntax formatCut [option] filesOption common parameters are as follows:-D: Used to define the delimiter, the default is the TAB key,
Command: Cut [options] File--Sort by file size shows the first 100 rows showing the last five columnsLl-sh|head-n 100|cut-d '-F 5-First, the basic grammarCut is a selection command that, in the unit of behavior, divides the rows into fields with the specified delimiter and selects the required fields.1. Syntax formatCu
-3109:47 old 18934 (: 0.0)[Email protected] temp]# who-u |cut-c 1-8RootRootRootRootCommand: PastePaste pasting data into related filesThere are two different sources of data that should be sorted first to ensure that the number of file rows is the sameFormat:p aste–d–s File1file2Options:-D Specify a different delimiter-S merges each file into rows instead of sticking them by lineFile112File2AB1. The merger$pastefile 1 File21 A2 B2. Specifying separato
The Cut command is also one of the most commonly used commands under Linux.As its name, cut's job is to "cut", specifically in the document is responsible for cutting the data used. Cut is a processing object for each line , and this mechanism is the same as SED.There are three cut
Tags: cutsortwcuniqteeShell special Characters
* Any of the characters
? Any one character
#注释字符
\ de-Semantic characters
| pipe character
$ variable prefix,!$ combination, regular inside means end of line
Multiple commands are written to one line, separated by semicolons.
~ User home directory, regular expression indicates match
put the command behind the command a
Tags: Shell special symbol cut, sort, WC, uniq, tee, TR, split command* Represents 0 or more arbitrary characters[[email protected] ~]# ls *txt11.txt 1.txt 22.txt 2.txt aa.txt a.txt? Represents only one arbitrary characterWhether it's a number or a letter, as long as it matches a single character.[email protected] ~]# ls?. Txt1.txt 2.txt a.txt B.txt[[email protected] ~]# ls? txtls: unreachable? txt: no file
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.