LINUX: Using sed to delete lines from files

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • More videos like this on www.theurbanpenguin.com :
    One thing you may want to automate from your scripts or command line is to delete lines from files. We looked in an earlier video at using echo to append a line to a file to disable an upstart service; but if you want to enable the service you would need to delete the line. sed -i /^manual/d filename will work a treat for us in this case, lets to a quick look, just 2 minutes this video.

Комментарии • 1