The criteria for a new file is the string JURISDICTION NUMBER:
No problem if this is the first line in the new file.
But you want already the previous line to go to the new file.
Here is a general solution with a backlog (ring-)buffer.
Last edited by MadeInGermany; 07-11-2014 at 08:14 AM..
Reason: changed b=2 to b=1 and adapted code
Hello!
Firts of all, I'm sorry for my English.
My problem:
I have text file with few Form Feed symbols (FF, ASCII code =12) inside (for example - some report, consists of some pages for
printing).
I want to split this text by pages - each page (until FF symbol)
in single file.
I... (2 Replies)
Dear all,
I have a large file which is composed of 8000 frames, what i would like to do is split the file into 8000 single files names file.pdb.1, file.pdb.2 etc etc
each frame in the large file is seperated by a "ENDMDL" flag so my thinking is to use this flag a a point to split the files... (4 Replies)
I have a text file with a list of items/patterns:
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig12238
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig34624... (1 Reply)
Hello, I am using awk to split a file into multiple files using command:
nawk '{
if ( $1 == "<process" )
{
n=split($2, arr, "\"");
file=arr
}
print > file }' processes.xml
<process name="Process1.process">
... (3 Replies)
Hello, I have a large file (2GB) that I would like to split based on pattern and size.
I've used the following command to split the file (token is "HELLO")
awk '/HELLO/{i++}{print > "file"i}' input.txt
and the output is similar to the following (i included filesize in KB):
10 ... (2 Replies)
Hi ,
I have huge files around 400 mb, which has clob data and have diffeent scenarios:
I am trying to pass scenario number as parameter and and get required modified file based on the scenario number and criteria.
Scenario 1:
file name : scenario_1.txt
... (2 Replies)
Hi,
I have a Huge 7 GB file which has around 1 million records, i want to split this file into 4 files to contain around 250k messages each.
Please help me as Split command cannot work here as it might miss tags..
Format of the file is as below
<!--###### ###### START-->... (6 Replies)
Hello All,
I have records in a file in a pattern A,B,B,B,B,K,A,B,B,K
Is there any command or simple logic I can pull out records into multiple files based on A record? I want output as
File1: A,B,B,B,B,K
File2: A,B,B,K (9 Replies)
Hi All-I am new to Unix , I need to write a script. Can someone help me with a requirement where I have list of files in a directory, I want to Merge the files if a pattern of string matches in filenames?
AAAL_555A_ORANGE1_F190404.TXT
AAAL_555A_ORANGE2_F190404.TXT
AAAL_555A_ORANGE3_F190404.TXT... (6 Replies)
Discussion started by: Shankar455
6 Replies
LEARN ABOUT OPENSOLARIS
listen
listen(3XNET) X/Open Networking Services Library Functions listen(3XNET)NAME
listen - listen for socket connections and limit the queue of incoming connections
SYNOPSIS
cc [ flag ... ] file ... -lxnet [ library ... ]
#include <sys/socket.h>
int listen(int socket, int backlog);
DESCRIPTION
The listen() function marks a connection-mode socket, specified by the socket argument, as accepting connections, and limits the number of
outstanding connections in the socket's listen queue to the value specified by the backlog argument.
If listen() is called with a backlog argument value that is less than 0, the function sets the length of the socket's listen queue to 0.
The implementation may include incomplete connections in the queue subject to the queue limit. The implementation may also increase the
specified queue limit internally if it includes such incomplete connections in the queue subject to this limit.
Implementations may limit the length of the socket's listen queue. If backlog exceeds the implementation-dependent maximum queue length,
the length of the socket's listen queue will be set to the maximum supported value.
The socket in use may require the process to have appropriate privileges to use the listen() function.
RETURN VALUES
Upon successful completions, listen() returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The listen() function will fail if:
EBADF The socket argument is not a valid file descriptor.
EDESTADDRREQ The socket is not bound to a local address, and the protocol does not support listening on an unbound socket.
EINVAL The socket is already connected.
ENOTSOCK The socket argument does not refer to a socket.
EOPNOTSUPP The socket protocol does not support listen().
The listen() function may fail if:
EACCES The calling process does not have the appropriate privileges.
EINVAL The socket has been shut down.
ENOBUFS Insufficient resources are available in the system to complete the call.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO accept(3XNET), connect(3XNET), socket(3XNET), attributes(5), standards(5)SunOS 5.11 10 Jun 2002 listen(3XNET)