Mailinglist Archive: opensuse-autoinstall (87 mails)

< Previous Next >
Re: [opensuse-autoinstall] problems with sed in a custom script
  • From: "Sebastian Reitenbach" <reitenbach@xxxxxxxxxxx>
  • Date: Fri, 09 Feb 2007 09:43:14 -0000
  • Message-id: <20070209094315.06AD647463@xxxxxxxxxxxxxxx>
Hi,

Lars Stavholm <stava@xxxxxxxxxxx> wrote:
> Sebastian Reitenbach wrote:
> > Hi all,
> >
> > I have a slight problem with autoyast on SLES 10. I want to add a line in
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx

< Previous Next >