Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sed from match to other match

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 :: sed between two patterns 
Shell :: npm install bootstrap 3 angular 
Shell :: online c linux compiler 
Shell :: git move file 
Shell :: journalctl date 
Shell :: libssl-dev ubuntu get version 
Shell :: os installation date 
Shell :: Install Inkscape 1.x manager ubuntu 
Shell :: gitlab login on terminal 
Shell :: docker swarm get nodes 
Shell :: how to see what files are committed in git 
Shell :: ubuntu libqt4 
Shell :: how to reset git branch to a certain commit. 
Shell :: git command 
Shell :: python code to find os version of Webserver 
Shell :: Install JDK on Rocky Linux 8 
Shell :: redis 
Shell :: copy all files from one directory to another 
Shell :: create a doxygen config file 
Shell :: docker compose limit logs 
Shell :: install sdl msys2 
Shell :: github undo last pushed commit 
Shell :: nautilus fedora install 
Shell :: git graph command 
Shell :: ubuntu iso 
Shell :: node git clone 
Shell :: Managing the Nginx Process 
Shell :: install hass.io docker raspberry pi 
Shell :: catkin install 
Shell :: install cyberpanel centos 7 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =