User Tools

Site Tools


bash:files:read_a_file:read_fields_from_a_file

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
bash:files:read_a_file:read_fields_from_a_file [2021/01/26 13:43] peterbash:files:read_a_file:read_fields_from_a_file [2021/01/26 13:44] (current) – [Field splitting, white-space trimming, and other input processing] peter
Line 99: Line 99:
  
 </WRAP> </WRAP>
- 
----- 
- 
-====== Field splitting, white-space trimming, and other input processing ====== 
- 
-When not to use the **-r** option: 
- 
-  * **-r**:  Prevents backslash interpretation (usually used as a backslash newline pair, to continue over multiple lines or to escape the delimiters). 
-    * Without this option, any unescaped backslashes in the input will be discarded. 
-    * You should almost always use the **-r** option with read. 
- 
-The most common exception to this rule is when **-e** is used, which uses Readline to obtain the line from an interactive shell. 
- 
-  * In that case, tab completion will add backslashes to escape spaces and such, and you do not want them to be literally included in the variable. 
-  * This would never be used when reading anything line-by-line, though, and **-r** should always be used when doing so. 
- 
  
 ---- ----
  
  
bash/files/read_a_file/read_fields_from_a_file.1611668596.txt.gz · Last modified: 2021/01/26 13:43 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki