When AWK is used for data file detection, it is necessary to detect the data file. Check whether it meets the requirements. For example, the fields in the generated data file are separated by 0x06. Records are separated by line breaks (one record occupies one row ). A row contains 29 fields. Therefore, we need to check data files in the process of detecting data files using AWK. Check whether it meets the requirements. For example, the fields in the generated data file are separated by 0x06. Records are separated by line breaks (one record occupies one row ). A row contains 29 fields. Therefore, I only need to determine whether the field column is 29 after 0x06 is used in each row. If it is less than 29, the data is certainly faulty. Output the row number and column number of fields. After online exploration, use the following statement: awk-F' [\ 06] ''{I = 1; while (I
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