Sponsored Content
Top Forums Shell Programming and Scripting transforming a multiline record to single line Post 302158029 by anju on Monday 14th of January 2008 03:48:32 AM
Old 01-14-2008
transforming a multiline record to single line

Hi All
I have a file like this

<LText>gvsvdkag<LREC>bdjvdj</LREC>nididyvv</LText>
<LText>gvsvdkag<LREC>bdj
vdj</LREC>nididyvv</LText>
<LText>gvsvdkag<LREC>b
djvdj</LREC>nididyvv</LText>
<LText>gvsvdkag<LREC>bdjvdj</LREC>nididyvv</LText>

How will i change the file to
<LText>gvsvdkag<LREC>bdjvdj</LREC>nididyvv</LText>
<LText>gvsvdkag<LREC>bdjvdj</LREC>nididyvv</LText>
<LText>gvsvdkag<LREC>bdjvdj</LREC>nididyvv</LText>
<LText>gvsvdkag<LREC>bdjvdj</LREC>nididyvv</LText>

Please help this is urgent!!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk Multiline Record Combine?

I'm trying to use Awk to get the id and name fields ($1 and $2) of file1 combined with their corresponding multiline records in file2 that are separated by blank line. Both files are ordered so that the first line of file1 corresponds to the first set of multiline records in file2 and so on. ... (4 Replies)
Discussion started by: RacerX
4 Replies

2. Shell Programming and Scripting

Multiline read with multicharacter record seperator

I have a file like the below: Start <</NumCopies 0001>> 0223 098 et(5926)sh 0223 098 mt(5926)sh End Start <</NumCopies 0001>> 0224 098 et(5926)sh 0224 098 mt(5926)sh End This file needs to be split to seperate files. Each of the seperate file will need to... (3 Replies)
Discussion started by: pt14
3 Replies

3. Shell Programming and Scripting

Regarding multiline record searching with specific pattern

Dear Experts, I need to extract specific records from one file which has multiline records. Input file pattern is: ============ aaaaaaaa bbbbbbbb asdf 1234 cccccccc dddddddd ============ aaaaaaaa bbbbbbbb qwer 2345 cccccccc dddddddd (7 Replies)
Discussion started by: dhiraj4mann
7 Replies

4. UNIX for Advanced & Expert Users

What is the difference between single line mode and multiline mode in Regular expressions?

Hi All, Can please let me know what is the difference between the single line mode and multi line mode in regular expresions? Thanks, Chidhambaram B (3 Replies)
Discussion started by: chidhu.anu
3 Replies

5. Shell Programming and Scripting

Split a single record to multiple records & add folder name to each line

Hi Gurus, I need to cut single record in the file(asdf) to multile records based on the number of bytes..(44 characters). So every record will have 44 characters. All the records should be in the same file..to each of these lines I need to add the folder(<date>) name. I have a dir. in which... (20 Replies)
Discussion started by: ram2581
20 Replies

6. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

7. Shell Programming and Scripting

Reject the record if the record in the next line does not satisfy the pattern

Hi, I have a input file with the following entries: 1one 2two 3three 1four 2five 3six 1seven 1eight 1nine 2ten The output should be 1one 2two 3three 1four 2five 3six (2 Replies)
Discussion started by: supchand
2 Replies

8. Shell Programming and Scripting

Format Parts of Multiline Section to Single Line

Hello, I have an input file that I need formatted. I was hoping I could use bash to get this done. Title: Kitchen Blender Washer Dishes Title: Bathroom Toilet Sink Title: Bedroom Bed Desired output would be similar to Results("Blender","Washer","Dishes") (1 Reply)
Discussion started by: jl487
1 Replies

9. Shell Programming and Scripting

Print first and last line from multiline record

Hi - I'm new to working with multiline records and I'm going nuts trying to do something that seems simple. Input: Tue May 1 14:00 Header Record 1 is valid. Tue May 1 14:00 processing data to 25-Mar-2012 09:00:23.15 Tue May 1 14:03 Header Record 1 is valid. Tue May 1 14:03 processing data... (4 Replies)
Discussion started by: Catullus
4 Replies

10. Shell Programming and Scripting

Combine multiline to one line till a blank line

Hello, I have a file as :- ABC DEF GHI JKL <BlankLine> MNO PQR STU VWX <BlankLine> YZA I need it as below:- ABCDEFGHIJKL; MNOPQRSTUVWX; (3 Replies)
Discussion started by: jassi10781
3 Replies
sdp(7D) 							      Devices								   sdp(7D)

NAME
sdp - Sockets Direct Protocol driver SYNOPSIS
#include <socket.h> #include <netinet/in.h> s = socket(AF_INET, SOCK_STREAM, PROTO_SDP); s = socket(AF_INET6, SOCK_STREAM, PROTO_SDP); DESCRIPTION
The Sockets Direct Protocol (SDP) is a transport protocol layered over the Infiniband Transport Framework (IBTF). SDP is a standard imple- mentation based on Annex 4 of the Infiniband Architecture Specification Vol 1 and provides reliable byte-stream, flow controlled two-way data transmission that closely mimics the Transmission Control Protocol (TCP). SDP supports a sockets-based SOCK_STREAM interface to application programs. It also supports graceful close (including half-closed sock- ets), IP addressing (IPv4 or IPv6), the connecting/accepting connect model, out-of-band (OOB) data and common socket options. The SDP pro- tocol also supports kernel bypass data transfers and data transfers from send-upper-layer-protocol (ULP) buffers to receive ULP buffers. A SDP message includes a BSDH header followed by data. (A BSDH header advertises the amount of available buffers on the local side). SDP networking functionality is broken into the sdp driver and a function call-based sockfs implementation. A new protocol family of PROTO_SDP is introduced to use the SDP transport provided by the driver. Sockets utilizing SDP are either active or passive. Active sockets initiate connections to passive sockets. Both active and passive sockets must have their local IP or IPv6 address and SDP port number bound with the bind(3SOCKET) system call after the socket is created. By default, SDP sockets are active. A passive socket is created by calling the listen(3SOCKET) system call after binding the socket with bind(). This process establishes a queueing parameter for the passive socket. Connections to the passive socket can be received with the accept(3SOCKET) system call. Active sockets use the connect(3SOCKET) call after binding to initiate connections. In most cases, SDP sends data when it is presented. When outstanding data is not yet acknowledged, SDP gathers small amounts of output to be sent in a single packet once an acknowledgement is received. For a small number of clients this packetization may cause significant delays. To circumvent this problem, SDP provided by the driver supplies SDP_NODELAY, a socket-level boolean option. Note that this behav- ior is similar to the TCP_NODELAY option. SDP provides an urgent data mechanism that can be invoked using the out-of-band provisions of send(3SOCKET). The out-of-band delivery behavior is identical to TCP. The caller may mark one byte as "urgent" with the MSG_OOB flag to send(3SOCKET). This sets an "urgent pointer" pointing to the byte in the SDP stream. The receiver of the stream is notified of the urgent data by a SIGURG signal. The SIOCAT- MARK ioctl(2) request returns a value indicating whether the stream is at the urgent mark. Because the system never returns data across the urgent mark in a single read(2) call, it is possible to advance to the urgent data in a simple loop which reads data, testing the socket with the SIOCATMARK ioctl() request until it reaches the mark. ADDRESS FORMATS
SDP uses IP/IPv6 addresses to refer to local and remote devices and opens a reliable connected IB connection between two end points. The sdp driver supports a point-to-point connection, however broadcasting and multicasting are not supported. SOCKET OPTIONS
SDP supports setsockopt and getsockopt to set and read socket options. Very few socket options affect SDP protocol operations. Other common socket options are processed but do not affect SDP protocol operation. All socket options are checked for validity. A getsockopt returns the values set or toggled by setsockopt. Socket options that affect protocol operations are SO_LINGER, SO_DEBUG, SO_REUSEADDR and SO_OOBINLINE. ERRORS
EISCONN A connect() operation was attempted on a socket on which a connect() operation had already been performed. ECONNRESET The remote peer forced the connection to be closed. This usually occurs when the remote machine loses state information about the connection due to a crash. ECONNREFUSED The remote peer actively refused connection establishment. This usually occurs because no process is listening to the port. EADDRINUSE A bind() operation was attempted on a socket with a network address/port pair that has already been bound to another socket. EADDRNOTAVAIL A bind() operation was attempted on a socket with a network address for which no network interface exists. EACCES A bind() operation was attempted with a reserved port number and the effective user ID of the process was not the privileged user. ENOBUFS The system ran out of memory for internal data structures. FILES
/kernel/drv/sdp 32-bit ELF kernel module (x86). /kernel/drv/amd64/sdp 64-bit ELF kernel module (x86). /kernel/drv/sparcv9/sdp 64-bit ELF kernel module (SPARC). /kernel/drv/sdpib 32-bit ELF kernel module (x86). /kernel/drv/amd64/sdpib 64-bit ELF kernel module (x86). /kernel/drv/sparcv9/sdpib 64-bit ELF kernel module (SPARC). ATTRIBUTES
See attributes(5) for descriptions of the following attribute: +-------------------------+---------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-------------------------+---------------------------------+ |Architecture | x86, SPARC | +-------------------------+---------------------------------+ |Availability | SUNWibsdp, SUNWibsdp | +-------------------------+---------------------------------+ SEE ALSO
read(2), getsockopt(3XNET), socket.h(3HEAD), accept(3SOCKET), bind(3SOCKET), connect(3SOCKET), send(3SOCKET), attributes(5), standards(5) Infiniband Architecture Specification Vol 1- Annex 4 -- November, 2002 SunOS 5.11 13 Nov 2006 sdp(7D)
All times are GMT -4. The time now is 12:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy