In a nutshell, I need to work out how to return the last matching pattern from an awk //,// search. I can bring back the first, but am unsure how to obtain the last, and a simple tail won't work as the match could be over multiple lines.
Secondly I would like some way of pattern matching, a... (10 Replies)
2008 Tue Apr 22 00:11:50
1.0
2.1
4.0
2008 Tue Apr 22 00:26:51
4.0
5.0
6.2
With the above as the input file, I would like to output:
2008 Tue Apr 22 00:11:50
7.1
2008 Tue Apr 22 00:26:51
15.2
In other words add the (numeric) records between the records that start with 2008 (all the... (5 Replies)
I am curious if the following can be done in a file in unix. Let's say I have a flat file with the following data
AAA,12,2,,,,
BBB,3,1,,,,
CCC,,,,,
DDD,2,,,,,
SQQ,,,,,
ASJ,,3,5
I only want to capture the data with values into a new file. If the data contains the pattern ,,,,, as in... (2 Replies)
Hello. I just found out about awk, and it appears that this could handle the problem I'm having right now.
I first stumbled on the thread How to extract first and last line of different record from a file, and that problem is almost similar to mine.
In my case, an ASCII file will contain the... (0 Replies)
can somebody provide me with some ksh code that will return true if my the contents in my variable match anyone of these strings ORA|ERROR|SP2
variable="Error:ORA-01017: Invalid username/password; logon denied\nSP2-0640:Not connected"
I tried this and it does not seem to work for me
... (3 Replies)
Hi I am trying to find a pattern match with column one containing 3 numbers.
input file tmp.lst
abcd456|1|23123|123123|23423
kumadff|a|dadfadf|adfd|adfadfadf
xxxd999|d|adfdfs|adfadf|adfdasfadf
admin|a|dafdf|adfadfa|||
output file tmp4.lst
abcd456|1|23123|123123|23423... (3 Replies)
I have two files, want to compare file1 data with file2 second column and print line which are not matching. Need help in matching the pattern, file2 second column number can be leading 0 or 00 or 000.
Example:
file1
1
2
3
file2
a,0001
b,02
c,000
d,01
e,2
f,0005
Expected output:... (20 Replies)
Hi all , I have two files : dblp.xml with dblp records and itu1.txt with faculty members records. I need to find out how many dblp records are related to the faculty members. More specific: I need to find out which names from itu1.txt are a match in dblp. xml file , print them and show how many... (4 Replies)
Hello all, I am having trouble with what should be an easy task, but seem to be missing something fundamental. I have two files, with File 1 consisting of a single field of many thousands of records. I also have File 2 with two fields and many thousands of records.
My goal is that when $1 of... (2 Replies)
Discussion started by: jvoot
2 Replies
LEARN ABOUT REDHAT
ldif
LDIF(5) File Formats Manual LDIF(5)NAME
ldif - LDAP Data Interchange Format
DESCRIPTION
The LDAP Data Interchange Format (LDIF) is used to represent LDAP entries in text form. LDAP tools, such as ldapadd(1) and ldapsearch(1),
read and write LDIF.
The basic form of an LDIF entry is:
dn: <distinguished name>
<attrdesc>: <attrvalue>
<attrdesc>: <attrvalue>
<attrdesc>:: <base64-encoded-value>
<attrdesc>:< <URL>
...
The value may be specified as UTF-8 text or as base64 encoded data, or a URI may be provided to the location of the attribute value.
A line may be continued by starting the next line with a single space or tab, e.g.,
dn: cn=Barbara J Jensen, dc=exam
ple, dc=com
Lines beginning with a sharpe sign ('#') are ignored.
Multiple attribute values are specified on separate lines, e.g.,
cn: Barbara J Jensen
cn: Babs Jensen
If an value contains a non-printing character, or begins with a space or a colon ':', the <attrtype> is followed by a double colon and the
value is encoded in base 64 notation. e.g., the value " begins with a space" would be encoded like this:
cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
If the attribute value is located in a file, the <attrtype> is followed by a ':<' and a file: URI. e.g., the value contained in the file
/tmp/value would be listed like this:
cn:< file:///tmp/value
Other URI schemes (ftp,http) may be supported as well.
Multiple entries within the same LDIF file are separated by blank lines.
EXAMPLE
Here is an example of an LDIF file containing three entries.
dn: cn=Barbara J Jensen, dc=example, dc=com
cn: Barbara J Jensen
cn: Babs Jensen
objectclass: person
description:< file://tmp/babs
sn: Jensen
dn: cn=Bjorn J Jensen, dc=example, dc=com
cn: Bjorn J Jensen
cn: Bjorn Jensen
objectclass: person
sn: Jensen
dn: cn=Jennifer J Jensen, dc=example, dc=com
cn: Jennifer J Jensen
cn: Jennifer Jensen
objectclass: person
sn: Jensen
jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
...
Notice that the description in Barbara Jensen's entry is read from file://tmp/babs and the jpegPhoto in Jennifer Jensen's entry is encoded
using base 64.
SEE ALSO ldap(3), ldapsearch(1), ldapadd(1) LDAP Data Interchange Format,Good,G.,RFC2849.
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.
OpenLDAP 2.0.27-Release 20 August 2000 LDIF(5)