Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sed extract string between two patterns

Just use following structure to get result between two different patterns:
sed -n '/^pattern1/,/^pattern2/p;/^pattern2/q' file.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: pull branch from remote to new local branch 
Shell :: online linux c compiler 
Shell :: install tensorflow from source ubuntu 18.04 
Shell :: Git: Unexpected identifier git commit error 
Shell :: better wget 
Shell :: alpine install package 
Shell :: linux find and remove bom from files 
Shell :: how to add text to promt in linux 
Shell :: Linux install from .tar.gz 
Shell :: How to remove Directories with rm 
Shell :: git set up 
Shell :: make flameshot default 
Shell :: git remove vendor folder from remote 
Shell :: ubuntu bluetooth dongle not working 
Shell :: mac tftp server directory 
Shell :: latte dock application launcher shortcut 
Shell :: download sublime merge in linux 
Shell :: create github repo with curl 
Shell :: pushing to existing repo 
Shell :: extract tar gz 
Shell :: git clone bare 
Shell :: push local branch changes to remote branch 
Shell :: pyaudio windows fail 
Shell :: ssh passphrase stop asking 
Shell :: windows openssh passwordless login 
Shell :: conda create new environment in specified location 
Shell :: command get list of gitlab runners 
Shell :: grep all lines after first match 
Shell :: jupyter lab download 
Shell :: insert text before cursor in vi 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =