Unix: Delete all lines after n lines below the line containing the first match

Subscribers:
4,120
Published on ● Video Link: https://www.youtube.com/watch?v=I2ENNRvTb-U



Duration: 3:47
2 views
0


Delete all lines after n lines below the line containing the first match
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA
Thanks to all those great people for their contributions!

(unix.stackexchange.com/users/32701/sadi)Sadi
(unix.stackexchange.com/users/22565/st%c3%a9phane-chazelas)Stéphane Chazelas
(unix.stackexchange.com/users/469418/prabhjot-singh)Prabhjot Singh
(unix.stackexchange.com/users/22222/terdon)terdon
(unix.stackexchange.com/users/133219/ed-morton)Ed Morton
A special thanks goes out to the (https://unix.stackexchange.com/questions/764958/delete-all-lines-after-n-lines-below-the-line-containing-the-first-match)Stackexchange community

I wish you all a wonderful day! Stay safe :)

shell-script text-processing awk sed







Tags:
shell-script
text-processing
awk
sed