Sponsored Content
Top Forums Shell Programming and Scripting Find the position of lines matching string Post 302491659 by Scrutinizer on Friday 28th of January 2011 02:51:13 AM
Old 01-28-2011
@homeboy: How does this: $1 ~ "RMR*"+num work? What does the + signify?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print lines with search string at specific position

Hi Folks, I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas? ... (4 Replies)
Discussion started by: HealthyGuy
4 Replies

2. Shell Programming and Scripting

how to find substring position in a given string

Hello, I have a string like str = "14: Jan 29 13:27:12 : Processor----: : Start of splitting file " from this, i have to find the position or location number starting for "Processor". I have to extract date from this entire string. string which i will give will not have fixed length. ... (2 Replies)
Discussion started by: balareddy
2 Replies

3. UNIX for Dummies Questions & Answers

Extracting lines that match string at certain position

I have a fixed length file in the following format <date><product_code><other data> The file size is huge and I have to extract only the lines that match a certain product code which is of 2 bytes length. I cannot use normal grep since that may give undesirable results. When I search for prod... (5 Replies)
Discussion started by: paruthiveeran
5 Replies

4. Shell Programming and Scripting

how to find a position and print some string in the next and same position

I need a script for... how to find a position of column data and print some string in the next line and same position position should find based on *HEADER8* in text for ex: ord123 abs 123 987HEADER89 test234 ord124 abc 124 987HEADER88 test235 ... (1 Reply)
Discussion started by: naveenkcl
1 Replies

5. Shell Programming and Scripting

Find the position of a string and replace with another string

Hi, I have a file named "Test_2008_01_21" The file contains a string "manual" that occurs many times in the file How can i find the positions of the string "manual" in the file Ex: if the string " manual " occurs three times in the file. i want to replace the second occurance of string... (6 Replies)
Discussion started by: bab123
6 Replies

6. Shell Programming and Scripting

Perl XML, find matching condition and grep lines and put the lines somewhere else

Hi, my xml files looks something like this <Instance Name="New York"> <Description></Description> <Instance Name="A"> <Description></Description> <PropertyValue Key="false" Name="Building A" /> </Instance> <Instance Name="B"> ... (4 Replies)
Discussion started by: tententen
4 Replies

7. UNIX for Dummies Questions & Answers

Find the list of filenames that have the string 31 at 4th and 5th position

Hi, Can anyone let me know the command to know the list of filenames that have string 31 in their 4th and 5th positions inside the file: grep -l "31" main*.txt The above grep lists all the files which have 31 at any position but I want filenames having 31 at position 4 and position 5. (8 Replies)
Discussion started by: okkadu
8 Replies

8. Shell Programming and Scripting

To find nth position of character in string

Hi guyz i want to know nth position of character in string. For ex. var="UK,TK,HK,IND,AUS" now if we see 1st occurance of , is at 3 position, 2nd at 6,..4th at 13 position. 1st position we can find through INDEX, but what about 2nd,3rd and 4th or may be upto nth position. ? In oracle we had... (2 Replies)
Discussion started by: Jonty Immortal
2 Replies

9. UNIX for Dummies Questions & Answers

String pattern matching and position

I am not an expert with linux, but following various posts on this forum, I have been trying to write a script to match pattern of charters occurring together in a file. My file has approximately 200 million characters (upper and lower case), with about 50 characters per line. I have merged all... (5 Replies)
Discussion started by: biowizz
5 Replies

10. Shell Programming and Scripting

Find a string and its position in a line from another string

Hello guys, would you please help me with this? this is the line inside a file: first line Something Today YYDDPPSVXIPYYY0XXXOFFS00000000000? I'd like to find the position of string XXX from string PYYY In the example above XXX starts from 6th position from PYYY desired... (4 Replies)
Discussion started by: netrom
4 Replies
dat_rmr_bind(3DAT)				     Direct Access Transport Library Functions					dat_rmr_bind(3DAT)

NAME
dat_rmr_bind - bind the RMR to the specified memory region within an LMR SYNOPSIS
cc [ flag... ] file... -ldat [ library... ] #include <dat/udat.h> DAT_RETURN dat_rmr_bind( IN DAT_RMR_HANDLE rmr_handle, IN DAT_LMR_TRIPLET *lmr_triplet, IN DAT_MEM_PRIV_FLAGS mem_privileges, IN DAT_EP_HANDLE ep_handle, IN DAT_RMR_COOKIE user_cookie, IN DAT_COMPLETION_FLAGS completion_flags, OUT DAT_RMR_CONTEXT *rmr_context ) PARAMETERS
rmr_handle Handle for an RMR instance. lmr_triplet A pointer to an lmr_triplet that defines the memory region of the LMR. mem_privileges Consumer-requested memory access privileges for the registered remote memory region. The Default value is DAT_MEM_PRIV_NONE_FLAG. The constant value DAT_MEM_PRIV_ALL_FLAG = 0x33, which specifies both Read and Write privi- leges, is also defined. Memory privilege definitions are as follows: Remote Read DAT_MEM_PRIV_REMOTE_READ_FLAG 0x02 Remote read access requested. Remote Write DAT_MEM_PRIV_REMOTE_WRITE_FLAG 0x20 Remote write access requested. ep_handle Endpoint to which dat_rmr_bind() is posted. user_cookie User-provided cookie that is returned to a Consumer at the completion of the dat_rmr_bind(). Can be NULL. completion_flags Flags for RMR Bind. The default DAT_COMPLETION_DEFAULT_FLAG is 0. Flag definitions are as follows: Completion Suppression DAT_COMPLETION_SUPPRESS_FLAG 0x01 Suppress successful Completion. Notification of Completion DAT_COMPLETION_UNSIGNALLED_FLAG 0x04 Non-notification completion. Local Endpoint must be configured for Notification Suppression. Barrier Fence DAT_COMPLETION_BARRIER_FENCE_FLAG 0x08 Request for Barrier Fence. rmr_context New rmr_context for the bound RMR suitable to be shared with a remote host. DESCRIPTION
The dat_rmr_bind() function binds the RMR to the specified memory region within an LMR and provides the new rmr_context value. The dat_rmr_bind() operation is a lightweight asynchronous operation that generates a new rmr_context. The Consumer is notified of the comple- tion of this operation through a rmr_bind Completion event on the request_evd_handle of the specified Endpoint ep_handle. The return value of rmr_context can be transferred by local Consumer to a Consumer on a remote host to be used for an RDMA DTO. The use of rmr_context by a remote host for an RDMA DTO prior to the completion of the dat_rmr_bind() can result in an error and a broken connection. The local Consumer can ensure that the remote Consumer does not have rmr_context before dat_rmr_bind() is completed. One way is to "wait" for the completion dat_rmr_bind() on the rmr_bind Event Dispatcher of the specified Endpoint ep_handle. Another way is to send rmr_context in a Send DTO over the connection of the Endpoint ep_handle. The barrier-fencing behavior of the dat_rmr_bind() with respect to Send and RDMA DTOs ensures that a Send DTO does not start until dat_rmr_bind() completed. The dat_rmr_bind() function automatically fences all Send, RDMA Read, and RDMA Write DTOs and dat_rmr_bind() operations submitted on the Endpoint ep_handle after the dat_rmr_bind(). Therefore, none of these operations starts until dat_rmr_bind() is completed. If the RMR Bind fails after dat_rmr_bind() returns, connection of ep_handle is broken. The Endpoint transitions into a DAT_EP_STATE_DISCON- NECTED state and the DAT_CONNECTION_EVENT_BROKEN event is delivered to the connect_evd_handle of the Endpoint. The dat_rmr_bind() function employs fencing to ensure that operations sending the RMR Context on the same Endpoint as the bind specified cannot result in an error from the peer side using the delivered RMR Context too soon. One method, used by InfiniBand, is to ensure that none of these operations start on the Endpoint until after the bind is completed. Other transports can employ different methods to achieve the same goal. Any RDMA DTO that uses the previous value of rmr_context after the dat_rmr_bind() is completed fail and report a protection violation. By default, dat_rmr_bind() generates notification completions. The mem_privileges parameter allows Consumers to restrict the type of remote accesses to the registered RMR by RDMA DTOs. Providers whose underlying Transports require that privileges of the requested RMR and the associated LMR match, that is o Set RMR's DAT_MEM_PRIV_REMOTE_READ_FLAG requires that LMR's DAT_MEM_PRIV_LOCAL_READ_FLAG is also set, o Set RMR's DAT_MEM_PRIV_REMOTE_WRITE_FLAG requires that LMR's DAT_MEM_PRIV_LOCAL_WRITE_FLAG is also set, or the operation fails and returns DAT_PRIVILEGES_VIOLATION. In the lmr_triplet, the value of length of zero means that the Consumer does not want to associate an RMR with any memory region within the LMR and the return value of rmr_context for that case is undefined. The completion of the posted RMR Bind is reported to the Consumer asynchronously through a DTO Completion event based on the specified com- pletion_flags value. The value of DAT_COMPLETION_UNSIGNALLED_FLAG is only valid if the Endpoint Request Completion Flags DAT_COMPLE- TION_UNSIGNALLED_FLAG. Otherwise, DAT_INVALID_PARAMETER is returned. The user_cookie parameter allows Consumers to have unique identifiers for each dat_rmr_bind(). These identifiers are completely under user control and are opaque to the Provider. The Consumer is not required to ensure the uniqueness of the user_cookie value. The user_cookie is returned to the Consumer in the rmr_bind Completion event for this operation. The operation is valid for the Endpoint in the DAT_EP_STATE_CONNECTED and DAT_EP_STATE_DISCONNECTED states. If the operation returns suc- cessfully for the Endpoint in DAT_EP_STATE_DISCONNECTED state, the posted RMR Bind is immediately flushed to request_evd_handle. RETURN VALUES
DAT_SUCCESS The operation was successful. DAT_INSUFFICIENT_RESOURCES The operation failed due to resource limitations. DAT_INVALID_PARAMETER Invalid parameter. For example, the target_address or segment_length exceeded the limits of the existing LMR. DAT_INVALID_HANDLE Invalid DAT handle. DAT_INVALID_STATE Parameter in an invalid state. Endpoint was not in the a DAT_EP_STATE_CONNECTED or DAT_EP_STATE_DISCONNECTED state. DAT_MODEL_NOT_SUPPORTED The requested Model was not supported by the Provider. DAT_PRIVILEGES_VIOLATION Privileges violation for local or remote memory access. DAT_PROTECTION_VIOLATION Protection violation for local or remote memory access. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard: uDAPL, 1.1, 1.2 | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
libdat(3LIB), attributes(5) SunOS 5.11 16 Jul 2004 dat_rmr_bind(3DAT)
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy