Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sed 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 :: grep show lines between matches 
Shell :: creating new branch in git 
Shell :: C linux compiler online 
Shell :: composer install ubuntu 
Shell :: The CUDA compiler identification is unknown CMake Error at CMakeLists.txt:441 (enable_language): No CMAKE_CUDA_COMPILER could be found. 
Shell :: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered 
Shell :: audacious music player 
Shell :: bat restart printer spooler 
Shell :: vi search 
Shell :: npm install and add to dependancies 
Shell :: -eq shell script 
Shell :: bash maximum running time 
Shell :: tmux status line with blank line on top 
Shell :: mac send email attachment command line 
Shell :: awk if column greater than 
Shell :: install radium 
Shell :: how to run a ipynb file in cmd 
Shell :: after checking out a previous commit go back to latest commit 
Shell :: windows commandline zip 
Shell :: change shell script to executable 
Shell :: delete archivelog sysdate-1 
Shell :: power shell 
Shell :: compress folder pigz 
Shell :: git pull asks for passphrase every time 
Shell :: Play any video on Ubuntu 
Shell :: copy data from one branch to another in git 
Shell :: xrandr configure crtc 2 failed ubuntu 
Shell :: dependencies needed for kernel edit linux amd64 
Shell :: ionic capacitor video player install 
Shell :: surge installation 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =