sed (or awk): add a new line "commit;" after every n-th line but only if next line starts with...
Channel: Roel Van de Paar
Date: 29/09/2020

Unix & Linux: sed (or awk): add a new line "commit;" after every n-th line but only if next line starts with pattern

Helpful?  Please support me on Patreon: https://www.patreon.com/roelvandepaar

With thanks & praise to God, and with thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user rush (https://unix.stackexchange.com/users/13003), user Ed Morton (https://unix.stackexchange.com/users/133219), user Cmdr 80 (https://unix.stackexchange.com/users/398419), user celadon (https://unix.stackexchange.com/users/396552), and the Stack Exchange Network (http://unix.stackexchange.com/questions/570976). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything is amiss at Roel D.OT VandePaar A.T gmail.com.