I want to remove block of text in file.
file
.
.
.
"chromedriver": {
"version": "80.0.2",
.
.
.
}
},
"ci-env": {
.
.
.
I want remove attribute chromedriver witch is define in multiple lines.
I tried this:
sed -i 's/"chromedriver"(\s|\n|.)*"ci-env":/"ci-env":/g' file
but it doesn't work. There is a oneliner that can resolve my problem? Is sed can do this?
jqis much more better suited thansed,awkand other line oriented unix tools.