02-16-2017
So - how would you do that? And how would you handle the results?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can i read all the unique words in a file, i used -
cat comment_file.txt | /usr/xpg6/bin/tr -sc 'A-Za-z' '/012'
and
cat comment_file.txt | /usr/xpg6/bin/tr -sdc 'A-Za-z' '/012'
but they didnt worked..... (5 Replies)
Discussion started by: aditya.ece1985
5 Replies
2. Shell Programming and Scripting
find the number of unique words in a file using sort com-
mand. (7 Replies)
Discussion started by: abhikamune
7 Replies
3. Shell Programming and Scripting
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies
4. Homework & Coursework Questions
Hello, I tried to count all unique words of all files in one folder and its subfolders. Can anybody say me, why this doesnt work:
ls| find -d | cat | tr "\ " "\n"| uniq -u | wc -l
???
Cat writes only the names of those files, but not the wors, which should be in them.
Thanks for any advice.
... (9 Replies)
Discussion started by: Dworza
9 Replies
5. Shell Programming and Scripting
I am having a file with duplicate words how can I eliminate them
ant,bat
bat,cat
cat a.txt | grep -bat | awk '{print $1}'
expecting o/p as ant,bat,cat
How can I display the output as ant,bat,cat in a single line and no duplicates exists. (2 Replies)
Discussion started by: shikshavarma
2 Replies
6. Shell Programming and Scripting
In each row there could be repetition of a word. I want to delete all repetitions and keep unique occurrences.
Example:
a+b+c ab+c ab+c
abbb+c ab+bbc a+bbbc
aaa aaa aaa
Output:
a+b+c ab+c
abbb+c ab+bbc a+bbbc
aaa (6 Replies)
Discussion started by: Viernes
6 Replies
7. Shell Programming and Scripting
Im looking for an awk script that will take the unique values in column 5, then print and count the unique values in column 6.
CA001011500 11111 11111 -9999 201301 AAA
CA001012040 11111 11111 -9999 201301 AAA
CA001012573 11111 11111 -9999 201301 BBB
CA001012710 11111 11111 -9999 201301... (4 Replies)
Discussion started by: ncwxpanther
4 Replies
8. Shell Programming and Scripting
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
9. Shell Programming and Scripting
Hello Team,
I need your help on the following:
My input file a.txt is as below:
3330690|373846|108471
3330690|373846|108471
0640829|459725|100001
0640829|459725|100001
3330690|373847|108471
Here row 1 and row 2 of column 1 are identical but corresponding column 2 value are... (4 Replies)
Discussion started by: angshuman
4 Replies
10. Shell Programming and Scripting
Hello,
I have a dictionary which I am building for the Open Source Community. The data structure is as under
HEADWORD=PARTOFSPEECH=ENGLISH MEANING
as shown in the example below
अ=m=Prefix signifying negation.
अँहँ=ind=Interjection expressing disapprobation.
अं=int=An interjection... (2 Replies)
Discussion started by: gimley
2 Replies
LEARN ABOUT MOJAVE
ldap_dup
LDAP_OPEN(3) Library Functions Manual LDAP_OPEN(3)
NAME
ldap_dup, ldap_destroy, - Duplicate and destroy LDAP session handles
LIBRARY
OpenLDAP LDAP (libldap, -lldap)
SYNOPSIS
#include <ldap.h>
LDAP *ldap_dup(
LDAP *old );
int ldap_destroy(
LDAP *old );
DESCRIPTION
ldap_dup() duplicates an existing LDAP (LDAP *) session handle. The new session handle may be used concurrently with the original session
handle. In a threaded environment, different threads may execute concurrent requests on the same connection/session without fear of con-
tamination. Each session handle manages its own private error results.
ldap_destroy() destroys an existing session handle.
The ldap_dup() and ldap_destroy() functions are used in conjunction with a "thread safe" version of libldap (libldap_r) to enable operation
thread safe API calls, so that a single session may be simultaneously used across multiple threads with consistent error handling.
When a session is created through the use of one of the session creation functions including ldap_open(3), ldap_init(3), ldap_initialize(3)
or ldap_init_fd(3) an LDAP * session handle is returned to the application. The session handle may be shared amongst threads, however the
error codes are unique to a session handle. Multiple threads performing different operations using the same session handle will result in
inconsistent error codes and return values.
To prevent this confusion, ldap_dup() is used duplicate an existing session handle so that multiple threads can share the session, and
maintain consistent error information and results.
The message queues for a session are shared between sibling session handles. Results of operations on a sibling session handles are acces-
sible to all the sibling session handles. Applications desiring results associated with a specific operation should provide the appropri-
ate msgid to ldap_result(). Applications should avoid calling ldap_result() with LDAP_RES_ANY as that may "steal" and return results in
the calling thread that another operation in a different thread, using a different session handle, may require to complete.
When ldap_unbind() is called on a session handle with siblings, all the siblings become invalid.
Siblings must be destroyed using ldap_destroy(). Session handle resources associated with the original (LDAP *) will be freed when the
last session handle is destroyed or when ldap_unbind() is called, if no other session handles currently exist.
ERRORS
If an error occurs, ldap_dup() will return NULL and errno should be set appropriately. ldap_destroy() will directly return the LDAP code
associated to the error (or LDAP_SUCCESS in case of success); errno should be set as well whenever appropriate.
SEE ALSO
ldap_open(3), ldap_init(3), ldap_initialize(3), ldap_init_fd(3), errno(3)
ACKNOWLEDGEMENTS
This work is based on the previously proposed LDAP C API Concurrency Extensions draft (draft-zeilenga-ldap-c-api-concurrency-00.txt)
effort. OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived
from University of Michigan LDAP 3.3 Release.
OpenLDAP 2.4.28 2011/11/24 LDAP_OPEN(3)