Artificial intelligent assistant

Sed - unknown option to `s' I execute a `sed` command in my script: sed -i "${1}s/${2}=.*/${2}=${REPLY}/" $3 this is the echo: sed -i 13s/log4j.appender.ROOT2.File=.*/log4j.appender.ROOT2.File=/app/TET/log.log/ /applis/DIAPASON/diapason1/conf/log4j.properties My error: `sed: -e expression n°1, character 61: unknown option for`s`'

You have multiple `/` characters inside the `$REPLY` variable, which is confusing `sed`.

You can choose an alternate delimiter for the `s///` command in most versions of `sed`, so if this were me, I'd try something like:


sed -i "${1}s|${2}=.*|${2}=${REPLY}|" $3


This replaces the `/` for sed with `|`, so that the `/` in `${REPLY}` are (hopefully) not interpreted by `sed`.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9d0df76805b564c393e7d20083fc58f8