sed:introduction
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sed:introduction [2020/08/17 10:54] – 192.168.1.1 | sed:introduction [2022/06/14 08:20] (current) – [Use of '\t' in sed scripts] peter | ||
---|---|---|---|
Line 12: | Line 12: | ||
===== Quoting Syntax ===== | ===== Quoting Syntax ===== | ||
- | The preceding examples use single quotes (' | + | The preceding examples use single quotes |
- | Single quotes prevent the Unix shell from interpreting the dollar sign ($) and back-quotes (`...`), which are expanded by the shell if they are enclosed in double quotes. | + | Single quotes prevent the Unix shell from interpreting the dollar sign **($)** and back-quotes |
- | Users of the " | + | Users of the **" |
- | Versions of sed written for DOS invariably require double quotes (" | + | Versions of sed written for DOS invariably require double quotes |
---- | ---- | ||
Line 28: | Line 28: | ||
However, most versions of sed do not recognize the ' | However, most versions of sed do not recognize the ' | ||
- | ' | + | <WRAP info> |
+ | **NOTE: | ||
+ | </ | ||
---- | ---- | ||
Line 43: | Line 46: | ||
sed '/foo/ s// | sed '/foo/ s// | ||
</ | </ | ||
+ | |||
+ | On line selection or deletion in which you only need to output lines from the first part of the file, a " | ||
+ | |||
+ | Thus: | ||
+ | |||
+ | <code bash> | ||
+ | sed -n ' | ||
+ | sed -n ' | ||
+ | </ | ||
+ |
sed/introduction.1597661678.txt.gz · Last modified: 2020/08/17 10:54 by 192.168.1.1