-
-
Save rponte/9157ac08dbb67a8abb2e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| lala | |
| begin | |
| sddasdas | |
| asdasdasd | |
| asdasd | |
| end | |
| lolo |
This file contains hidden or 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
| lala | |
| lolo | |
| begin | |
| sddasdas | |
| asdasdasd | |
| asdasd | |
| end |
This file contains hidden or 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
| # Moves DDL block to the end of file | |
| sed '$ r /tmp/lol | |
| /begin/,/end/{ | |
| w /tmp/lol | |
| d | |
| }' input.txt > output.txt | |
| # We can use -i.bak to override input file | |
| sed -i.bak '$ r /tmp/lol | |
| /begin/,/end/{ | |
| w /tmp/lol | |
| d | |
| }' input.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment