I want to delete lines like this
sed '/FROM_HERE/,/TO_HERE/d'
but I would like to *not* delete the second match, i.e. the TO_HERE line. How can I achieve this?
Thank you! (1 Reply)
Hi, I've searched in this forum all day long but was not able to find enough codes to help me do a task. The only code that I can come up with is this:
sed '/ /,/ /{//p;d;}' inputfile > outputfile
I would like to sed/awk/grep a file for two patterns and then delete the lines between... (4 Replies)
Hi All,
Below is my requirement. Whatever coming in between ' ', needs to delete.
Input File Contents:
==============
This is nice 'boy'
This 'is
bad
boy.' Got it
Expected Output
===========
This is nice
This
Got it (4 Replies)
Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows.
header for file
1111
2222
3333
header for file
1111
2222
3333
header for file... (8 Replies)
Hi,
i need help to delete all the lines between 2 matched patterns and the first pattern must be deleted too. sample as follows:
inputfile.txt
>kump_1
...........................
...........................
>start_0124
dgfhghgfh
fgfdgfh
fdgfdh
>kump_2
............................. (7 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Hi, I need to print lines which are matching with start pattern "SELECT" and END PATTERN ";" and only select the last "select" statement including the ";" .
I have attached sample input file and the desired input should be as:
INPUT FORMAT:
SELECT
ABCD,
DEFGH,
DFGHJ,
JKLMN,
AXCVB,... (5 Replies)
Discussion started by: nani2019
5 Replies
LEARN ABOUT DEBIAN
nuaclgen
NUACLGEN(8)NUACLGEN(8)NAME
nuaclgen - NUFW acl generator
SYNOPSIS
nuaclgen [ --Schema eq|ineq ] [ --Aclname ACLDN ] [ --saddr NETWORK1 ] [ --daddr NETWORK2 ] [ --proto PROTONUMBER ] [ --sport P1[:P2] ] [
--dport P3[:P4] ] [ --OsName OSNAME ] [ --OsVersion OSVERSION ] [ --OsRelease OSRELEASE ] [ --AppName APPLICATION NAME ] [ --AppSig APPLI-
CATION SIGNATURE ] [ --Separator SEPARATOR ] [ --jump [ACCEPT|DROP] ] [ --groups GROUPLIST ]
nuaclgen [ --List ] [ --groups Id Group ]
nuaclgen [ --Delete DN ]
nuaclgen [ --help ]
DESCRIPTION
This manual page documents the nuaclgen command.
nuaclgen is an Access control list generator for the ldap backend of Nuauth, the authentication server of the NUFW package.
Original packaging and informations and help can be found from http://www.nufw.org/
OPTIONS --Schema eq|ineq
Use equality schema or not (Equality schema requires dport be specified, and is the default.
--AclName Acl DN
Add an acl in the ldap tree with dn Acl DN
--saddr Network
Specify source network for the acl, with network of the form : aaa.bbb.ccc.ddd[/ee]. Default value : 0.0.0.0/0
--daddr Network
Specify destination network for the acl, with network of the form : aaa.bbb.ccc.ddd[/ee]. Default value : 0.0.0.0/0
--proto Protocol number
Specify protocol type for the acl
--sport Source port
Specify source port(s) for the Acl. NNNN:MMMM can be used to specify a port range.
--dport Destination port
Specify destination port(s) for the Acl. NNNN:MMMM can be used to specify a port range.
--jump Decision
Specify decision for the Acl. Has to be ACCEPT or DROP.
--groups Groups list
Specify the user group(s) on which Acl apply. Must be of the form : Group1[,Group2[,...]]
--List --group Group ID
List Acls for the Group ID group
--Delete Dn
Deletes the Acl stored in the provided Dn
--help Displays a brief resume of available options and quits
SEE ALSO nufw(8)nuauth(8)AUTHOR
Nuauth was designed and coded by Eric Leblond, aka Regit (<eric@regit.org>) , and Vincent Deffontaines, aka gryzor (<vincent@gryzor.com>).
Original idea in 2001, while working on NSM Ldap support.
This manual page was written by Eric Leblond and copyrighted by INL (2003-2005)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 2 as
published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
12 mars 2007 NUACLGEN(8)