grep show lines between matches
$ sed -n '/aaa/,/cdn/p' file
aaa
b12
cdn
$ sed -n '/zdk/,/dke/p' file
zdk
aaa
b12
cdn
dkeJust use following structure to get result between two different patterns:
sed -n '/^pattern1/,/^pattern2/p;/^pattern2/q' file.txt
Also in C++:
- gestures in ubuntu
- how to search file name in linux using wildcard
- how to copy paste in git bash
- how to send mail and attachment using powershell
- show all running service linux
- ubuntu can't locate packages
- tracert
- ubuntu update
- adonis migration run
- updating vscode on ubuntu
- goodix debug linux
- pm2 adonisjs
- angular/animations install npm
- cp -r copy linux directory or file
- disable sound tab windows 10
- install traceroute ubuntu 18.04
- how to restart psql in linux
- bash how to generate md5 checksums on all files in a directory
- find total commit in git by specific user
- noetic catkin tools install
- install dlib
- how to prevent bash or zsh from interpreting special characters
- change password ubuntu 20.04
- sed delete line with matching pattern