ubuntu:sed:new_line
Differences
This shows you the differences between two versions of the page.
ubuntu:sed:new_line [2019/12/04 20:07] – created peter | ubuntu:sed:new_line [2019/12/10 18:38] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Ubuntu - SED - New line ====== | ||
- | |||
- | Neither **\s*** (as I would use in javascript and php) nor **\s\{3, | ||
- | |||
- | Note too that **\n** is not recognized as a new line. To get a new line **\' | ||
- | |||
- | To modify the .profile file. | ||
- | |||
- | <code sed> | ||
- | #sed -i .bak ' | ||
- | #sed -i .bak ' | ||
- | </ | ||
- | |||
- | The two lines above did what I wanted but the second line did a backup of the modified ~/ | ||
- | |||
- | <code sed> | ||
- | sed -i .bak ' | ||
- | \export\ JAVA_HOME=\/ | ||
- | \export\ PATH=${JAVA_HOME}\/ | ||
- | </ | ||
- | |||
- | The new line is achieved by ending a regex with \ and continuing it with \ on the next line. If there are white spaces in front of \ they will also appear in ~/.profile. | ||
ubuntu/sed/new_line.1575490062.txt.gz · Last modified: 2020/07/15 09:30 (external edit)