my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
say echo "me there $chco" (with the echo command)
the below is not doing the job... i dont watnt to replace a string. All i need is it should delete line 4 and replace my whole sentence in that line
sed -i '4 s|*|echo \"me there \$ech\" |' output
PS: i dont want to perform any file redirection either
any help is appreciated thanks