I execute a sed command in my script:sed -i ${1}s/${2}=.*/${2}=${REPLY}/ $3this is the echo:sed -i 13s/log4j.appender.ROOT2.File=.*/log4j.appender.ROOT2.File=/app/TET/log.log/ /applis/DIAPASON/diapason1/conf/log4j.propertiesMy error:sed: -e expression n1, character 61: unknown option fors`'
Sed - unknown option to `s'
bash;sed
You have multiple '/' charachters 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.