Sponsored Content
Full Discussion: no of occurences of q word
Top Forums Shell Programming and Scripting no of occurences of q word Post 302241255 by Satyak on Monday 29th of September 2008 02:24:20 AM
Old 09-29-2008
Java no of occurences of a word

hi vijay,
what u gave is good, but where i need to pass the string or file name
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

number of occurences of a string

hi, I have a file where i need to count the occurences of a string ex) 'welcome to unix forum'. can anybody help me out (12 Replies)
Discussion started by: siddu_chittari
12 Replies

2. Web Development

How to find all occurences of word?

Hi, For example lets consider i have word like this:cell I have some text that is stored in table. These are few sentences. TRAP also regulates translation of trpE by promoting formation of an cell. In addition initiation of pabA, trpP and ycbK by directly blocking cells. I... (0 Replies)
Discussion started by: vanitham
0 Replies

3. Shell Programming and Scripting

occurences of words

I have a string like this. $str="The astrocyte profile might contribute to the identification of possible therapies in profiles profiling and profiled als."; Lets consider for example: a)If user enters the term profile* it should highlight profile,profiles only. b)If user enters the... (3 Replies)
Discussion started by: vanitham
3 Replies

4. UNIX for Dummies Questions & Answers

How to count the occurences of a specific word in a file in bash shell

Hello, I want to count the occurences of a specific word in a .txt file in bash shell. Can somebody help me pleaze?? Thanks!!! (2 Replies)
Discussion started by: mskart
2 Replies

5. UNIX for Dummies Questions & Answers

Count number of occurences of a word

I want to count the number of occurences of say "200" in a file but that file also contains various stuff including dtaes like 2007 or smtg like 200.1 so count i am getting by doing grep -c "word" file is wrong Please help!!!!! (8 Replies)
Discussion started by: shikhakaul
8 Replies

6. UNIX for Dummies Questions & Answers

Number of word occurences in a file?

Hello world, Can anybody tell me how to count how many times does a word repeat in a file? There have been many threads on this but they all are heavy loads of Scripting for a starter like me. :D So, I sat down today and after some hours of reading man pages, I found a simple one-line... (18 Replies)
Discussion started by: satish51392111
18 Replies

7. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

8. Shell Programming and Scripting

awk count occurences

line number:status, market, keystation 1,SENT,EBS,1 : 1 2,DONE,REU,1 : 1 3,SENT,EBS,2 : 1 4,DONE,EBS,1 : 0 5,SENT,EBS,2 : 0 6,SENT,EBS,2 : 0 7,SENT,EBS,2 : 0 8,SENT,EBS,1 : 1 for each status, market combination I want to keep a tally of active orders. i.e if an order is SENT, then +1, if... (8 Replies)
Discussion started by: Calypso
8 Replies

9. Shell Programming and Scripting

Order as per top occurences

Hi I have a file with entries like below top 5 a 5 b 4 c 3 d 2 e 1 top 5 b 5 d 4 c 3 e 2 a 1 top 5 e 5 d 4 c 3 b 2 a 1 (2 Replies)
Discussion started by: Viswanatheee55
2 Replies

10. UNIX for Beginners Questions & Answers

Count occurences of the word without it repeating

Hi, I would like to count the number of ALA occurences without having them to be repeated. In the script I have written now it has 40 repetitions of ALA but it has to be 8. ALA is chosen as one of the 20 values it can have when the script asks for the input of AAA, which for this example is chosen... (7 Replies)
Discussion started by: Aurimas
7 Replies
Connecting to BrlAPI(3) 					      BrlAPI						   Connecting to BrlAPI(3)

NAME
Connecting to BrlAPI - Data Structures struct brlapi_connectionSettings_t Settings structure for BrlAPI connection. Macros #define BRLAPI_SOCKETPORTNUM 4101 #define BRLAPI_SOCKETPORT '4101' #define BRLAPI_SOCKETPATH '/var/lib/BrlAPI' #define BRLAPI_ETCDIR '/etc' #define BRLAPI_AUTHKEYFILE 'brlapi.key' #define BRLAPI_DEFAUTH BRLAPI_ETCDIR '/' BRLAPI_AUTHKEYFILE #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL } Typedefs typedef int brlapi_fileDescriptor Functions brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection (const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)" brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection (brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)" void BRLAPI_STDCALL brlapi_closeConnection (void) void BRLAPI_STDCALL brlapi__closeConnection (brlapi_handle_t *handle) Detailed Description Before calling any other function of the library, calling brlapi_openConnection() is needed to establish a connection to BrlAPI 's server. When the connection is not needed any more, brlapi_closeConnection() must be called to close the connection. Macro Definition Documentation #define BRLAPI_AUTHKEYFILE 'brlapi.key' Default name of the file containing BrlAPI 's authorization key This name is relative to BRLAPI_ETCDIR #define BRLAPI_DEFAUTH BRLAPI_ETCDIR '/' BRLAPI_AUTHKEYFILE Default authorization setting #define BRLAPI_ETCDIR '/etc' brltty 's settings directory This is where authorization key and driver-dependent key names are found for instance. #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL } Allows to initialize a structure of type brlapi_connectionSettings_t * with default values. #define BRLAPI_SOCKETPATH '/var/lib/BrlAPI' Default unix path on which connections to BrlAPI can be established #define BRLAPI_SOCKETPORT '4101' #define BRLAPI_SOCKETPORTNUM 4101 Default port number on which connections to BrlAPI can be established Typedef Documentation typedef int brlapi_fileDescriptor Function Documentation void BRLAPI_STDCALL brlapi__closeConnection (brlapi_handle_t *handle) brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection (brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings) void BRLAPI_STDCALL brlapi_closeConnection (void) Cleanly close the socket This function locks until a closing acknowledgement is received from the server. The socket is then freed, so the file descriptor brlapi_openConnection() gave has no meaning any more brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection (const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings) Open a socket and connect it to BrlAPI 's server This function first loads an authorization key as specified in settings. It then creates a TCP socket and connects it to the specified machine, on the specified port. It writes the authorization key on the socket and waits for acknowledgement. Returns: the file descriptor, or -1 on error Note: The file descriptor is returned in case the client wants to communicate with the server without using libbrlapi functions. If it uses them however, it won't have to pass the file descriptor later, since the library keeps a copy of it. But that also means that brlapi_openConnection() may be called several times, but libbrlapi functions will always work with the last call's descriptor Example: if (brlapi_openConnection(&settings,&settings)<0) { fprintf(stderr,'couldn't connect to BrlAPI at %s: %s0, settings.host, brlapi_strerror(&brlapi_error)); exit(1); } Errors: BrlAPI might not be on this TCP port, the host name might not be resolvable, the authorization may fail,... Parameters: desiredSettings this gives the desired connection parameters, as described in brlapi_connectionSettings_t. If NULL, defaults values are used, so that it is generally a good idea to give NULL as default, and only fill a brlapi_connectionSettings_t structure when the user gave parameters to the program for instance; actualSettings if not NULL, parameters which were actually used are stored here, if the application ever needs them. See Also: brlapi_connectionSettings_t brlapi_writePacket() brlapi_readPacketHeader() brlapi_readPacketContent() brlapi_readPacket() Author Generated automatically by Doxygen for BrlAPI from the source code. Version 1.0 Mon Apr 1 2013 Connecting to BrlAPI(3)
All times are GMT -4. The time now is 09:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy