bash - sed -e "\$aDNS3=" won't save the DNS3= to the file -
sed -e "\$adns3=" <filedirectory>
i'm trying add in line "dns3=" in end of file, after executing command in bash script, opens file , include dns3= last line did not save changes. there anyway save changes , not show changes made?
you can use -i
option. edit file in-place.
from man sed
:
-i[suffix], --in-place[=suffix]
edit files in place (makes backup if suffix supplied)
using sed -e "\$adns3=" -i filename
set dns3=
last line of file.
Comments
Post a Comment