Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash get lines between

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 remote branch git 
Shell :: rails how to use joins 
Shell :: working fork linux c compiler 
Shell :: inicializar as credenciais no git 
Shell :: libpopt install ubuntu 
Shell :: how to check gems installed 
Shell :: how to set gopath/bin linux 
Shell :: append two image terminal 
Shell :: Help manual in linux 
Shell :: install gh 
Shell :: make tar.gz 
Shell :: the ycmd server install 
Shell :: bash find term in files 
Shell :: powershell ssh with password 
Shell :: Ansible gather facts with adhoc command 
Shell :: restart fstab ununtu 
Shell :: install wordpress in windows 10 
Shell :: git create 
Shell :: windows command to grant permission to a directory 
Shell :: extract tar.gz linux command line 
Shell :: REMOTE HOST IDENTIFICATION HAS CHANGED! how to fix in ubuntu 
Shell :: change directory in git bash 
Shell :: start shell on rosetta 2 
Shell :: ssh passphrase stop prompting 
Shell :: docker run with privileges 
Shell :: how to enable ssh on headless raspberry pi 
Shell :: cannot find module inquirer 
Shell :: cordova-plugin-camera android crash 
Shell :: centos 7 install docker compose 
Shell :: nc http server 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =