Re: [opensuse-autoinstall] problems with sed in a custom script
Sebastian Reitenbach wrote:
Hi all,
I have a slight problem with autoyast on SLES 10. I want to add a line in
Hi, Lars Stavholm <stava@telcotec.se> wrote: the
middle of a file with sed. I have the following statement in one of my
sed -e "/^RUNDIR=\/var\/run/ s/RUNDIR=\/var\/run/RUNDIR=\/var\/run\nexport VARIABLE=test/g" file1 > file1.new
when I run my script manually after the installation, it works as expected, I have the lines
RUNDIR=/var/run exprot VARIABLE=test
but when the script is called while autoyast is running, the file1.new ends up with following contents:
RUNDIR=/var/run\nexprot VARIABLE=test
any hint on what am I doing wrong and what I can do to fix it?
Try this: sed -i -e '/^\RUNDIR=\/var\/run/aexport VARIABLE=test' file
unfortunately, this is not working, It produces empty output. I just wonder why the sed script is working when I run it manually on commandline after installation,but not while run from autoyast. kind regards Sebastian -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (1)
-
Sebastian Reitenbach