Answer by Alessandro Dal Gobbo for sed command - Replace string in file
sed 's/patternFrom/patternTo/' file.txt • "s/" means substitute what follows: this substitution must now be applied to our file, by typing a single line command: • Commands can be applied by sed only...
View ArticleAnswer by mazs for sed command - Replace string in file
With sed : sed -E 's/(jvmRoute=)([a-zA-Z0-9"-])+/\1"VALUE10"/g' As you have not specified what can the original jvmRoute value be, i wrote the regex for the above example, but you can customize it for...
View ArticleAnswer by Kusalananda for sed command - Replace string in file
Your sed command won't change anything because your file does not contain any line that starts with the string jvmRoute. XML parsing should be done with an XML parser. XMLStarlet is a good command-line...
View ArticleAnswer by Ulrich Schwarz for sed command - Replace string in file
You don't have any lines starting with "jvmRoute". (^ means beginning of line, just omitting that should change the two occurences in your file.)
View Articlesed command - Replace string in file
I want to modify a value in my server.xml file: <?xml version='1.0' encoding='utf-8'?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements....
View Article