linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: MARG <lists@tuxdoit.com>
Cc: linux-admin@vger.kernel.org
Subject: Re: Inserting a line at a specific point
Date: Fri, 16 Dec 2005 11:07:26 +0000	[thread overview]
Message-ID: <17314.40942.305935.60673@cerise.gclements.plus.com> (raw)
In-Reply-To: <43A258DF.3020505@tuxdoit.com>


MARG wrote:

> I want to insert these two lines in Apache's httpd.conf:
> LoadModule python_module modules/mod_python.so
> AddModule mod_python.c
> 
> just right after the line
> LoadModule php5_module modules/libphp5.so
> 
> and not at the end of the file (with a simple echo "AddModule
> mod_python.c" >> httpd.conf).

Use a text editor.

Unless, that is, you need to automate the process. In which case, the
correct approach depends upon exactly why and how you need to do this. 
Whatever the reason, ad-hoc sed scripts to modify config files
probably isn't the right approach.

One option is to create a patch (with "diff") which you can apply with
"patch". Use -C or -U with a suitable argument so that the patch will
apply reliably to any httpd.conf file.

-- 
Glynn Clements <glynn@gclements.plus.com>

      parent reply	other threads:[~2005-12-16 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-16  6:04 Inserting a line at a specific point MARG
2005-12-16 10:03 ` Adrian C.
2005-12-16 11:07 ` Glynn Clements [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17314.40942.305935.60673@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=linux-admin@vger.kernel.org \
    --cc=lists@tuxdoit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).