From: Stephen_Reilly at domain dell.com
Date: Mon 10 Jun 2002 - 16:37:09 IST
'course another easy way of doing it would be to have a marker at
the end of each line. For example:
99,RestartStyleHint=3 #installfile
99,Priority=1 #installfile
99,RestartCommand=killall ooqstart #installfile
then do "sed '/#installfile/d' filename" or "grep -v #installfile filename".
Other than that to delete specific lines (having their line number
is handy) "sed '12,16d' filename" will remove lines 12 to 16 inclusive.
A full thing though not pretty would be...
sed `grep -n begin filename | cut -f1 -d:`,`grep -n end filename | cut -f1
-d:`d filename
steve
-----Original Message-----
From: Niall Sheridan [mailto:niall.sheridan at domain ormsby-rhodes.ie]
Sent: 10 June 2002 16:10
To: Stephen_Reilly at domain exchange.dell.com
Cc: ilug at domain linux.ie
Subject: Re: [ILUG] Opposite of Cat >>
On Mon, 10 Jun 2002 08:48:31 -0500
Stephen_Reilly at domain dell.com wrote:
> Why not have a backup of all modified files. Then for uninstall overwrite
> with original.
Configuration files can change significantly at any point in time between
the install and uninstall.
Niall
> steve
>
> -----Original Message-----
> From: Stephen Shirley [mailto:diamond at domain skynet.ie]
> Sent: 10 June 2002 14:22
> To: Irish Linux Users Group
> Subject: Re: [ILUG] Opposite of Cat >>
>
>
> On Mon, Jun 10, 2002 at 12:57:06PM +0100, Brian Foster wrote:
> > this is trivial to un-install --- just delete all lines
> > between (and including) the two magic marker lines.
> > numerous tools can do this, sed(1) is perhaps a good
> > choice
>
> I'm just wondering, could you give a snippet of sed code to demonstrate
> this? I've used sed for line editing lots of times, but anything more
> complex, and the man page maketh no sense to me. I've even tried looking
> for example sed scripts on the sed homepage, but no joy. Therefore, for
> this sort of thing, i'd use sed, cause i know how -)
>
> Steve
> --
> "Oh look, it's the Pigeon of Love."
>
> --
> Irish Linux Users' Group: ilug at domain linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
information.
> List maintainer: listmaster at domain linux.ie
>
> --
> Irish Linux Users' Group: ilug at domain linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
information.
> List maintainer: listmaster at domain linux.ie
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:11 GMT