This code:
echo Foo | sed -e 's/Foo/Bar'
results in an unescaped newline inside substitute pattern (instead of the expected Bar ).
unescaped newline inside substitute pattern
Bar
I obviously miss something simple, bash / sed / escaping related, but I can't find out what causes this?
You are missing the final / :
/
echo Foo | sed -e 's/Foo/Bar/'
Source: https://habr.com/ru/post/1239719/More articles:How to check if a list contains another list in the same order - listHow to use fswatch and rsync to automatically synchronize directories? - rsyncFree monad and free operation - haskellMatlab: all binary matrix combinations - matrixWhen you click on a text field, how to focus it, but donβt change the location of the cursor inside - c #respond to native: selectable view of partition list gives error - javascriptUse reCAPTCHA v2 in the background? - javascriptES2015 Export Internal Function - javascriptExecute 2 JavaScript functions in order - javascriptHow to uniquely name an object - javaAll Articles