hi all,
I need to grep for a string in a file which is in another string
For Ex:
This is the sample file
sample.txt
number 1234
name raje
passwd 1234
date 123
service 75
service 23
I have made a unix command like this, i am not sure this is correct or wrong. If any better... (3 Replies)
when using grep -f file1 file2
if you have multiple entries in the pattern file1 that are the same will it take the line out of file2 that matches file1 each time it comes up? if not by default can you set a flag to make this possible? or another way - can you get it to search for and match the... (8 Replies)
I wanted to search a for all lines containing ERROR but not errors that contained the word "foo" (for example). The only way I could figure out to do it was:
grep ERROR myfile.log | grep -v foo
is there a way to do this with one grep command instead of two? One grep is faster than two,... (4 Replies)
As i understand the filter process of grep i was wondering, is it possible to to have a hidden word in a file(eg ------) and then use the grep filter to find a specific letter in that word which you can then replace with the letter in that word (eg ---a--) if it is please show me an example if it... (6 Replies)
Hi,
I want to grep a word "success" from /home/user/ab123 and put it in a txt file. There are lot of directories under ab123 and subdirectories. So is it like this?
/home/user/123: grep -i -R "success" > grepsuccess.
Please give me a command...
Thanks. (4 Replies)
I have a requirement where I need to search for 26 consecutive 000000.000 in a file. I tried using grep but it is not working.
The string I need to search is ... (2 Replies)
Hello,
I looking to use grep to return a string with exactly n matches.
I'm building off this:
ls -aLl /bin | grep '^.\{9\}x' | tr -s ' '
-rwxr-xr-x 1 root root 632816 Nov 25 2008 vi
-rwxr-xr-x 1 root root 632816 Nov 25 2008 view
-rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
Hi everyone,
i am german, so excuse my bad english.
i got a problem with the grep-command.
i got a file with a lot of entries and i want to grep some of them out into another file.
here is a part of the file:
1038194 ξΟΥΙΝ & δΕΞΗΑΜΠ, βξη 10, 1886, 486, ΝΟ.
1038195 1;
1038196 ... (2 Replies)
Hello,
I am a new Unix user and new to shell programming. I am working on a script to go through a log file and find the text error:
grep -i 'error' monplus.mplog
if I find the text error in the log file I would like to echo a message to the operator staing there is an error
I am currently... (2 Replies)
Discussion started by: dtracy01
2 Replies
LEARN ABOUT LINUX
ldap_delete_ext
LDAP_DELETE(3) Library Functions Manual LDAP_DELETE(3)NAME
ldap_delete, ldap_delete_s, ldap_delete_ext, ldap_delete_ext_s - Perform an LDAP delete operation.
LIBRARY
OpenLDAP LDAP (libldap, -lldap)
SYNOPSIS
#include <ldap.h>
int ldap_delete_s(ld, dn)
LDAP *ld;
char *dn;
int ldap_delete(ld, dn)
LDAP *ld;
char *dn;
int ldap_delete_ext(ld, dn, serverctrls, clientctrls, msgidp)
LDAP *ld;
char *dn;
LDAPControl **serverctrls, **clientctrls;
int *msgidp;
int ldap_delete_ext_s(ld, dn, serverctrls, clientctrls)
LDAP *ld;
char *dn;
LDAPControl **serverctrls, **clientctrls;
DESCRIPTION
The ldap_delete_s() routine is used to perform an LDAP delete operation synchronously. It takes dn, the DN of the entry to be deleted. It
returns an LDAP error code, indicating the success or failure of the operation.
The ldap_delete() routine is used to perform an LDAP delete operation asynchronously. It takes the same parameters as ldap_delete_s(), but
returns the message id of the request it initiated. The result of the delete can be obtained by a subsequent call to ldap_result(3).
The ldap_delete_ext() routine allows server and client controls to be specified to extend the delete request. This routine is asynchro-
nous like ldap_delete(), but its return value is an LDAP error code. It stores the message id of the request in the integer pointed to by
msgidp.
The ldap_delete_ext_s() routine is the synchronous version of ldap_delete_ext(). It also returns an LDAP error code indicating success or
failure of the operation.
ERRORS
ldap_delete_s() returns an LDAP error code which can be interpreted by calling one of ldap_perror(3) and friends. ldap_delete() returns -1
if something went wrong initiating the request. It returns the non-negative message id of the request if things went ok.
ldap_delete_ext() and ldap_delete_ext_s() return some Non-zero value if something went wrong initiating the request, else return 0.
SEE ALSO ldap(3), ldap_error(3)ACKNOWLEDGEMENTS
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from Uni-
versity of Michigan LDAP 3.3 Release.
OpenLDAP 2.4.25 2011/03/26 LDAP_DELETE(3)