Mailinglist Archive: opensuse-autoinstall (87 mails)
| < Previous | Next > |
Re: [opensuse-autoinstall] problems with sed in a custom script
- From: Lars Stavholm <stava@xxxxxxxxxxx>
- Date: Fri, 09 Feb 2007 08:15:32 +0100
- Message-id: <45CC1F94.2030900@xxxxxxxxxxx>
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
/L
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
> 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
/L
--
To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |