textPlaceManagement ToolsWC(word count)Statisticsfileinsidecapacity
WC command is used to Statistics the line of the file number , Word Number of Knots , separated by a space Open the character number of words Information
language Law: WC [ filename ...]
WC [ options ] [ filename ...]
Options :
- L : Statistics Line number (lines)
- W : Count Words (words)
- C : Statistics Word Number of knots (bytes)
- M : Statistics character number
- L : Statistics files in the most Long Line of Long degree
Cutcharacter Interception
Cutcommand is used to intercept the characters in a file, or to split multiplenumberWord,thewith ","intoIf you want to splitContinuousfields,thewith "-"intoRow Split (1-9)
language Law: cut [ options ...] [ file name]
Cut [ specify delimiter] [filename]
Options :
- D : Specifies a delimiter (only one is specified), this option and Character appended Room you can not add spaces
- F : Specifies the number of columns to extract, this option and Character appended Room you can not add spaces
# : The specified single field
#-# : Multiple fields in a row
#,# : A discrete number of fields
- N : with the " - b " option Knot use, do not split multiple words Section character
- S : No Display lines that do not contain separators are shown
--output-delimiter= delimiter; Specify lose out inside The tolerance is the field divided Cut character
Cut The Limitations
Cut command Default recognize It is not possible to use multiple spaces for to be Separators
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9C/20/wKioL1lsc9iQ1D5RAAByGNmXMsw533.jpg "title=" Aaa.jpg "alt=" Wkiol1lsc9iq1d5raabygnmxmsw533.jpg "/>
SortSort
Sortused towill befileintorow Sort,and WillSortKnotFruitMarkQuasiloseout;SortTacitrecognizeis better thanmorethe first of each lineacharacters, ascending in alphabetical orderintoRow Sort
language Law: sort [ filename ...]
sort [ options ] [ filename ...]
Options :
- F : Ignore character size Write
- R : Reverse Sort
- k : In the specified field as the standard Quasi into Row Sort
- T : Specify the field delimiter
- N : To value size into Row Sort
- u : Heavy Complex the line, only Display shown once
UniqIgnore heavyComplex
Uniq used to ignore the weight in the file Complex OK, General with the Sort Knot combined Use
language Law: uniq [ options ] [ file name]
Options :
- C : Display Show each line out now The Times number
- D : only display Display Weight re-over the line
- u : only display shown didn't have heavy re-over the line
This article is from "ZYJTF Lone Cloud Twilight" blog, please be sure to keep this source http://zhangdaifu.blog.51cto.com/11848193/1948216
Linux Text Processing Tools