sed:numbering:number_each_line_of_a_file
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
sed:numbering:number_each_line_of_a_file [2020/08/15 10:55] – 192.168.1.1 | sed:numbering:number_each_line_of_a_file [2020/08/15 10:55] (current) – removed 192.168.1.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SED - Numbering - Number each line of a file ====== | ||
- | |||
- | ===== Simple left alignment. ===== | ||
- | |||
- | Using a tab instead of space will preserve margins. | ||
- | |||
- | <code bash> | ||
- | sed = filename | sed ' | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ==== Example ==== | ||
- | |||
- | Running that command again this file: | ||
- | |||
- | <file bash testfile> | ||
- | aaa | ||
- | bbb | ||
- | ccc | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <file bash testfile> | ||
- | 1 aaa | ||
- | 2 bbb | ||
- | 3 ccc | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
sed/numbering/number_each_line_of_a_file.1597488900.txt.gz · Last modified: 2020/08/15 10:55 by 192.168.1.1