Using sed and replacing the first matching line only

3,862 views · Published 18 March 2017 · 7:32 · Indexed 26 October 2026

Channel: theurbanpenguin · 2017 · Education

Watch on YouTube

Sometime you only want to replace the first maching line with sed not all the lines. We show you using the time configuration file for Chrony how we can replace the first server entry leaving the other in place.

Additionally you can find my video courses on Pluralsight: http://pluralsight.com/training/Authors/Details/andrew-mallett and take time to see my own site http://www.theurbanpenguin.com

More from this channel