awk:awk_field_separator_delimiters
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
awk:awk_field_separator_delimiters [2021/01/06 15:40] – peter | awk:awk_field_separator_delimiters [2022/06/13 09:41] (current) – peter | ||
---|---|---|---|
Line 16: | Line 16: | ||
===== Specifying Input Field Separator Delimiter ===== | ===== Specifying Input Field Separator Delimiter ===== | ||
- | To set an alternative field delimiter, issue the following command: | + | To set an alternative field delimiter: |
<code awk> | <code awk> | ||
Line 30: | Line 30: | ||
<WRAP info> | <WRAP info> | ||
**NOTE: | **NOTE: | ||
- | |||
* AWK **FS** is any single character or regular expression which you want to use as a input field separator. | * AWK **FS** is any single character or regular expression which you want to use as a input field separator. | ||
* AWK **FS** can be changed any number of times, it retains its values until it is explicitly changed. | * AWK **FS** can be changed any number of times, it retains its values until it is explicitly changed. | ||
* If you want to change the field separator, its better to change before you read the line; so the change affects the line that is read. | * If you want to change the field separator, its better to change before you read the line; so the change affects the line that is read. | ||
- | |||
</ | </ | ||
Line 43: | Line 41: | ||
===== Specifying Output Field Separator Delimiter ===== | ===== Specifying Output Field Separator Delimiter ===== | ||
- | To set an alternative field delimiter for the output, issue the following command: | + | To set an alternative field delimiter for the output: |
<code awk> | <code awk> | ||
Line 49: | Line 47: | ||
</ | </ | ||
- | which will display something like: | + | returns: |
< | < |
awk/awk_field_separator_delimiters.1609947619.txt.gz · Last modified: 2021/01/06 15:40 by peter