Last active
May 5, 2022 09:47
-
-
Save mche/eee09a548cd875ad621d5dee0f27fa40 to your computer and use it in GitHub Desktop.
Много строк и много групп в sed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Удалена группа комментов | |
Переставлены местами группы 1 (без звездочки) и 2 (со звездочкой в начале первой строки) | |
Раздпелитель свопнутой второй группы на выходе - ** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Строку коммента убрать | |
# еще коммент убрать | |
нужная строка 1 | |
еще нужная строка 2 | |
* вторая группа нужных строк помечается * | |
еще строка в группе 2 | |
# дальше новый захват match | |
# ... | |
строка группы 1 | |
еще строка группы 1 | |
* строка в группе 2 | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* вторая группа нужных строк помечается * | |
еще строка в группе 2 | |
** | |
нужная строка 1 | |
еще нужная строка 2 | |
* строка в группе 2 | |
еще строка в группе 2 | |
** | |
строка группы 1 | |
еще строка группы 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment