|
Home > Archive > Unix administration > January 2004 > sed problems with append command a\
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
sed problems with append command a\
|
|
| Roland Reichenberg 2004-01-23, 4:54 pm |
| Hi NG,
I want to add a config variable to several config files using the sed.
I have the following sed-script "my_sed_script":
$a\
VAR=new_variable
So I call the sed like this:
user@host > sed -n -f my_sed_script config_file > config_file_new
This works fine. So I want to insert this sed-call in a bash script that
finds all necessary config files and appends the variable. But in the bash
script I have have a sed problem with the following call:
user@host > sed -n -e '$a\ VAR=new_variable' config_file > config_file_new
The sed says:
sed: -e expression #1, char 4: Extra characters after command.
What is going wrong? I have tried to escape the '\' wihtout success.
Thanks in advance,
Roland
| |
| Barry Margolin 2004-01-23, 4:54 pm |
| In article <bdshfb$8es$1@news.nrw.net>,
Roland Reichenberg <r.reichenberg@gmx.de> wrote:quote:
>I want to add a config variable to several config files using the sed.
Please don't multi-post. I just answered this in another newsgroup
(comp.unix.questions, I think).
What does this have to do with system administration, anyway?
comp.unix.questions was the perfect group for it.
--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
|
|
|
|
|