well i ask here because i have around 12 hours trying with examples on internet for put a replace with sed on a custom script.
In the file a had a lots of lines but i want to replace values after "=" are the follow
[Paths]
config=
data=
mupen64plus=
plugins=
roms=
[Plugins]
audio=
input=
rsp=
video=
Values i need to put in results after replace : Well i need the result of variable "$PWD" not literally "$PWD"
[Paths]
config="$PWD/Datos/config"
data="$PWD/Datos/config"
mupen64plus="$PWD/$EJECUTABLE"
plugins=./.libs/64Bits/plugin
roms="$PWD/Roms"
[Plugins]
audio=mupen64plus-audio-sdl
input=mupen64plus-input-sdl
rsp=mupen64plus-rsp-cxd4-sse2
video=mupen64plus-video-glide64mk2
Because for too much hours i try things like this :
sed -i "s|mupen64plus=.*\"|mupen64plus="$PWD/"$EJECUTABLE\"|g" "file.conf"
This not make something on file
another varations like :
sed "s#^(mupen64plus=).*#\l ${"\/`pwd`"//#/\\#}#" "file.conf"
Show "bad substitution" or something like that
Another things i try and don't work :
sed 's:#mupen64plus=:'`pwd`':' "file.conf"
This :
sed -E "s/(data=).*/\1\.\/Datos\/\config/" "./file.conf"
Make this replacement :
data=./Datos/nfig
sed -E "s/(data=).*/\1\.\/Datos\/\c\/o\/nfig/" "./Datos/config/mupen64plus-qt.conf"
data=./Datos/oo/nfig
sed -E "s/(data=).*/\1\.\/Datos\\co\nfig/" "./Datos/config/mupen64plus-qt.conf"
data=./Datos/
well or is much easer use another thing like awk, someone can help me with this, please ?