AWK's designated File:fan1 for FS | 11h | Ok | 160.96 | 11139 RPMFAN2 | 12h | Ok | 160.96 | RPMFAN3 | 13h | Ok | 160.96 | 10763 RPMFAN4 | 14h | Ok | 160.96 | 10998 RPMFAN5 | 15h | Ok | 160.96 | 11515 rpm[code]awk-f ' [] ' {print $9} ' fileawk-f ' [] ' ($9>11000) ' File#awk specifies a space for the separate character awk-f ' [] ' 1. Use the vacancy character as a separate field to set the FS Set to a space, in which case the leading and trailing vacancies (spaces or tabs) are ignored. FS defaults to a space awk-f "" Specifies a space, and the beginning and end of the blank is ignored by awk ' {} ' file2. Use a single character awk-f "," awk ' begin{fs= ","} ' 3. Set more than one character as a field separator, The leftmost longest non-overlapping substring that the delimiter matches the regular expression is interpreted as a regular expression # Specifies a tab fs= "\ t" #指定一个或者多个制表符FS = "\t+" uses regular expressions to specify several characters as delimiters fs= "[': \ t]" 4. Each character is a domain fs= ""
$ Echo ' a b c d ' | awk ' {print; $ = $ = $; print} ' a b c da b c D first time as-is output the second time, the assignment of the $ $ is reorganized, just to combine $ $nf into a new $ so the opening space is ignored.
For more scripts, see: 100 Script Web
The designation of the AWK FS