The designation of the AWK FS

Source: Internet
Author: User
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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.