User Tools

Site Tools


awk:awk_field_separator_delimiters

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
awk:awk_field_separator_delimiters [2021/01/06 15:40] peterawk: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:**  This is useful when a space is not being used as the delimiter in the input file. **NOTE:**  This is useful when a space is not being used as the delimiter in the input file.
- 
  
   * 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.
- 
  
 </WRAP> </WRAP>
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:
 </code> </code>
  
-which will display something like:+returns:
  
 <code> <code>
awk/awk_field_separator_delimiters.1609947619.txt.gz · Last modified: 2021/01/06 15:40 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki