Created
January 28, 2019 02:53
-
-
Save liusheng/3bb07fe1b1da18d4f60e3a7476387593 to your computer and use it in GitHub Desktop.
sed commands notes
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
# replace specific word with another word following rows of another specific word | |
sed -i '/OS::Neutron::Router/,+5s|aaa|bbb|' path/to/file | |
#similar | |
sed -i '/OS::Neutron::Router/,+5d' path/to/file | |
sed '/OS::Neutron::Router/,+5p' path/to/file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment