Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sed add newline

For substituting with newline use sed command to replace a match with a
not used char and tr command to replace that char with a newline '
'
#For example:
echo "123." | sed -E 's/([[:digit:]]*)./1|next line/' | tr '|' '
'
Comment

sed add new lines using a pattern

sed -i -e 's/yourpattern/yourpatternXXXTTTXXX/g' -i -e 's/XXXTTTXXX/
/g' file
									^add some unique pattern here
                                 # -i update the file , try without -i   
Comment

PREVIOUS NEXT
Code Example
Shell :: bash ls sort by size 
Shell :: ionic capacitor ios 
Shell :: ubuntu gitlab 
Shell :: how to delete branch on git 
Shell :: bash get files older than 
Shell :: connect to git repo with ssh-rsa 
Shell :: export docker image 
Shell :: install solidity compiler command with version 
Shell :: unittest run specific test 
Shell :: xampp install in linux fedora 
Shell :: delete remote git tags matching pattern 
Shell :: mongodb bitnami helm 
Shell :: clear terminal mac 
Shell :: install vs code on ubuntu 
Shell :: authy 
Shell :: wps office has not found any installed printers 
Shell :: how to install node version to current folder only 
Shell :: renaming a file in linux 
Shell :: texlive 2019 in ubuntu 18.4 
Shell :: install missforest 
Shell :: upgrade armbian 
Shell :: poetry install packages 
Shell :: time machine logs 
Shell :: echo variable referenced in variable 
Shell :: raid 0 
Shell :: zsh deno command not found 
Shell :: http-server run pwa 
Shell :: how to make apache2 not autorestat when startup 
Shell :: bash provide path to same dir as executable 
Shell :: git credential.helper does not store username password 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =