[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
editfiles: Deleting lines between 2 regex
From: |
Yves |
Subject: |
editfiles: Deleting lines between 2 regex |
Date: |
Mon, 12 May 2003 20:11:34 +0100 |
Hello,
I 've added some lines in a file.
{ /etc/profile
BeginGroupIfNoLineContaining "/etc/xmodmaprc"
Append " "
Append "# Edited on $(date) via cfengine -keyboard- cfSTART"
Append "if [[ -r /etc/xmodmaprc ]] then"
Append " /usr/bin/X11/xmodmap /etc/xmodmaprc 2>&1 >/dev/null"
Append "fi"
Append "# -keyboard- cfEND"
EndGroup
}
How can I delete the lines in an easy and safety way again ?
Something like that would be fine:
DeleteLinesBetweenTwoRegex "$cfSTART" "$cfEND"
or is there a solution which I haven't recognized ?
DeleteNLines quoted-string
DeleteToLineMatching quoted-regex seems to be difficult
Gruß Yves
Y99@gmx.de am 07.05.2003
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- editfiles: Deleting lines between 2 regex,
Yves <=