Why do you need a script? What stops you from using it as a one line command like
This splits by bytes and could split half lines; use -l with an average line length to keep entire lines.
Last edited by RudiC; 11-20-2014 at 06:32 AM..
Reason: removed "a" from target file name
Hi,
I'm, new to shell scripting, I have a requirement where I have to split an incoming file into separate files each containing a maximum of 3 million rows.
For e.g: if my incoming file say In.txt has 8 mn rows then I need to create 3 files, in which two will 3 mn rows and one will contain 2... (2 Replies)
Hello,
if i have file like this:
010000890306932455804 05306977653873 0520080417010520ISMS SMT ZZZZZZZZZZZZZOC30693599000 30971360000 ZZZZZZZZZZZZZZZZZZZZ202011302942311 010000890306946317387 05306977313623 0520080417010520ISMS SMT... (6 Replies)
Hello all.
Sorry, I know this question is similar to many others, but I just can seem to put together exactly what I need.
My file is tab delimitted and contains approximately 1 million rows. I would like to send lines 1,4,& 7 to a file. Lines 2, 5, & 8 to a second file. Lines 3, 6, & 9 to... (11 Replies)
Dear All,
I would like to split a file of the following format into multiple files based on the number in the 6th column (numbers 1, 2, 3...):
ATOM 1 N GLY A 1 -3.198 27.537 -5.958 1.00 0.00 N
ATOM 2 CA GLY A 1 -2.199 28.399 -6.617 1.00 0.00 ... (3 Replies)
Dear users,
I need your support, I have a file like this:
272134.548 6680572.715
272134.545 6680572.711
272134.546 6680572.713
272134.548 6680572.706
272134.545 6680572.721
272134.543 6680572.710
272134.544 6680572.715
272134.543 6680572.705
272134.540 6680572.720
272134.544... (10 Replies)
Could anybody help with this?
I have input below .....
david,39
david,39
emelie,40
clarissa,22
bob,42
bob,42
tim,32
bob,39
david,38
emelie,47
what i want to do is count how many names there are with different ages, so output would be like this ....
david,2
emelie,2
clarissa,1... (3 Replies)
Hello Friends,
Can anyone help me for the below requirement.
I am having a file called Input.txt.
My requirement is first check the count that is wc -l input.txt
If the result of the wc -l Input.txt is less than 10 then don't split the Input.txt file. Where as if Input.txt >= 10 the split... (12 Replies)
Hi
i have requirement like below
M <form_name> sdasadasdMklkM
D ......
D .....
M form_name> sdasadasdMklkM
D ......
D .....
D ......
D .....
M form_name> sdasadasdMklkM
D ......
M form_name> sdasadasdMklkM
i want split file based on line number by finding... (10 Replies)
Hello All ,
I have a file which needs to split based on the blank lines
Name ABC
Address London
Age 32
(4 blank new line)
Name DEF
Address London
Age 30
(4 blank new line)
Name DEF
Address London (8 Replies)
Discussion started by: Pratik4891
8 Replies
LEARN ABOUT DEBIAN
flow-split
flow-split(1) General Commands Manual flow-split(1)NAME
flow-split -- Split flow files into smaller files.
SYNOPSIS
flow-split [-gGhn] [-b big|little] [-C comment] [-d debug_level] [-N nflows] [-o outfile_basename] [-T nseconds] [-z z_level]
DESCRIPTION
The flow-split utility will split a flow file into smaller files based on the the number of flows or the ammount of time that has passed.
OPTIONS -b big|little
Byte order of output.
-C Comment
Add a comment.
-d debug_level
Enable debugging.
-g Split on source tag.
-G Split on destination tag.
-h Display help.
-n Use symbols for tag field in filename.
-N nflows Split after processing nflows.
-o outfile_basename
The basename of the resulting files.
-T nsecond
Split after processing an interval of nseconds flows.
-z z_level
Configure compression level to z_level. 0 is disabled (no compression), 9 is highest compression.
EXAMPLES
Create 1 minute flow files from the flow archive in /flows/krc4. Store the results in /flows/krc4.split
flow-cat /flows/krc4 | flow-split -T60 -o /flows/krc4.split/1min.
BUGS
None known.
AUTHOR
Mark Fullmer maf@splintered.net
SEE ALSO flow-tools(1)flow-split(1)