Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Perfect. How would I change the delimiter? One of the values is a pathname so I'm trying to change the delimiter to a pipe. I've tried replacing all of the delimiters as well as just the two following the 's' and both error out. -sed -i "/\[shovel\]/,/^$/ s|home = .*|home = /home/test/" file gives me: sed: -e expression #1, char 48: unterminated 's' command and -sed -i "|\[shovel\]|,|^$| s|home = .*|home = /home/test/" file gives me: sed: -e expression #1, char 1: unknown command: '|' Commented Jan 27, 2017 at 17:01
  • You just need to put the last delimiter in: sed '/\[shovel\]/,/^$/ s|enabled = 0|enabled = 1|' @user1930831 :) Commented Jan 27, 2017 at 18:50