Deleting Specific Lines in a File with sed or yq

Поделиться
HTML-код
  • Опубликовано: 25 авг 2024

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

  • @samoylov1973
    @samoylov1973 10 месяцев назад +1

    this sed command will also work (if I got it right):
    sed '/volumes:$/,/^$/d' docker_compose.yml
    # deletes every line that ends with "volumes:" and all the code that follows up to next blank line.

    • @armaanR
      @armaanR 2 месяца назад +1

      Thank you man!