Why this bash scriptssh $SERVER bash <<EOFsed -i s/database_name: [^ ]*/database_name: kartable_$ME $PARAM_FILEexitEOFoutput ->sed: -e expression #1, char 53: unterminated `s' command
Why does sed outputs char 53: unterminated `s' command
sed
The s command in sed, uses a specific syntax:s/AAAA/BBBB/optionswhere s is the substitution command, AAAA is the regex you want to replace, BBBB is with what you want it to be replaced with and options is any of the substitution command's options, such as global (g) or ignore case (i).In your specific case, you were missing the final slash /, if you add it, sed will work just fine:  ~  sed 's/database_name: [^ ]*/database_name: kartable_$ME/'database_name: somethingdatabase_name: kartable_$MEinfo sed 'The s Command' includes the full description and usage of the s command.