Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

replace a newline using sed linux bash

$ echo 'foo
bar
baz

foo2
bar2
baz2' 
| tr '
' '00' 
| sed 's:x00x00.*:
:g' 
| tr '00' '
'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #newline #sed #linux #bash
ADD COMMENT
Topic
Name
8+4 =