Hi
I want to delete first five and last five lines in text files without opening the file and also i want to keep the same file name for all the files.
Thanks in advance!!!
Ragav (10 Replies)
Hi
I am writing a script which should read a file and search for certain strings 'approved' or 'removed' and retain only those lines that contain the above strings.
Ex: file name 'test'
test:
approved package
waiting for approval package
disapproved package
removed package
approved... (14 Replies)
Input:
a
b
b
c
d
d
I need:
a
c
I know how to get this (the lines that have duplicates) :
b
d
sort file | uniq -d
But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible )
I got a file (trace file to recreate the control file from oracle for the dba boys)
which contains
some lines
another line... (11 Replies)
Hello,
I have a group of text files with many lines in each file.
I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Hi all,
I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex:
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
LEARN ABOUT REDHAT
ud.conf
UD.CONF(5) File Formats Manual UD.CONF(5)NAME
ud.conf - ud configuration file
SYNOPSIS
/etc/openldap/ud.conf
DESCRIPTION
The ud configuration file is used to set system-wide defaults to be applied when running ud. Note that each user may specify an optional
configuration file, .udrc, in his/her home directory which will be used instead of the system-wide configuration file.
OPTIONS
The different configuration options are:
HOST <name>
Used to specify the name of an LDAP server to which ud should connect. There may be only one entry per config file. The
server's name can be specified as a domain-style name or an IP address.
BASE <base>
Used to specify the search base to use when performing search operations. The base may be changed by those using ud by using the
cb command. There may be only one entry per config file. The base must be specified as a Distinguished Name in LDAP format.
GROUPBASE <base>
Used to specify the base used when creating groups. The base may be changed by those using ud by using the changegroup command.
There may be only one entry per config file. The base must be specified as a Distinguished Name in LDAP format.
SEARCH <algorithm>
Used to specify a search algorithm to use when performing searches. More than one algorithm may be specified, and each is tried
in turn until a suitable response is found.
Each algorithm specifies a filter that should be used when performing a find operation. Filters contain LDAP-style attribute
types (e.g., uid, cn, postalAddress) and operators to test for equality or approximate equality. Prefix operators may also be
used to specify AND, OR and NOT operations (see ldap(3) for more details on the filter format). Algorithms use a compile-time
constant as a separator to use when parsing the input the user has provided. This parsed input can then be referenced similarly
to an awk program using symbols like $1, $2, and $0 for the entire batch of input.
For example, the algoritm cn=$0 causes ud to perform a lookup on the entire string the user has typed, searching for anything
where the commonName exactly matches the whole thing.
Another example, sn~=$NF causes ud to do a search where the last element the user has typed (NF = number of fields and is a spe-
cial "number" that can be used in awk as well as ud) searching for any matches that approximately match Surname.
Search algorithms also support a special feature which allows one to specify the exact number of fields that must be present in
order for the algorithm to be applied. This number must be specified between square brackets.
For example, [1] uid=$1 causes this algorithm to be applied when the number of fields is exactly equal to one. If there is
exactly one field, the token is looked up as a UID.
FILES
/etc/openldap/ud.conf
SEE ALSO ud(1), ldap(3)AUTHOR
Bryan Beecher, University of Michigan
ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan
LDAP 3.3 Release.
4.3 Berkeley Distribution 20 August 2000 UD.CONF(5)