Using sed to Insert and Delete Lines in Linux Text File

Опубликовано: 27 Июнь 2022
на канале: theurbanpenguin
3,705
140

The Linux stream editor sed allows your to programmatically edit files including being able to insert, append and delete lines in text files. We look at sed on Alma Linux 8 but this would be the same on any Linux distribution.

Making a copy of the /etc/chrony/chrony.conf file in Linux we show how delete comments and empty lines before looking at adding and removing other lines.

Blog of video here: https://www.theurbanpenguin.com/sed-i...

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

00:00 Intro
01:04 Copy file
02:03 Remove commented and empty lines
05:51 Delete last line
07:15 Append line after last line
07:41 Append after line 1
08:46 Delete lines using regex
09:16 Append line using regex

~-~~-~~~-~~-~
Please watch: "RHCSA 9 Working With Podman Containers"
   • How To Use Podman Containers  
~-~~-~~~-~~-~


На этой странице сайта вы можете посмотреть видео онлайн Using sed to Insert and Delete Lines in Linux Text File длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь theurbanpenguin 27 Июнь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 3,705 раз и оно понравилось 140 зрителям. Приятного просмотра!