I have already read a similar question, but there is no solution to my problem.
I want to delete some line in some file I use sed in the script this is the code.
line="this"
del='echo "'/"$line"/d'"' #it's a AltGr+7 on AZERTY keyboard but for readability of the code I use '
sed -i $del /home/example/fic.txt
I also try:
line="this"
del='echo "/"$line"/d"'
sed $del /home/example/fic > /home/example/fic
but I have the same error:
sed: -e expression #1, char 1: unknown command: `''
in the code and I use ' only for example. I use
in my script but it doesn't work :) – Tsifi Stifen Aug 07 '19 at 11:56line
– Siva Aug 07 '19 at 12:52$(...)
instead of backticks -- easier to see that it's different from single quote. – glenn jackman Aug 07 '19 at 23:15