Here is a little bash script to generate 10million test records (for those wanting to test performance of their solutions):
make_test.bash
Call it like this ./make_test.bash > Status.txt 2> Input.txt
Here is my solution:
Will update this post when I know the runtime :-
Stack dump at record 20,127,745 (of 27,713,184) while reading Status.txt after 1m36s runtime
Seems like it's just too much data for my PC. Good news is it didn't seem to take very long to read in the data and there is hope for larger (64bit) servers.
Last edited by Chubler_XL; 06-13-2012 at 09:30 PM..
Here is a little bash script to generate 10million test records (for those wanting to test performance of their solutions):
make_test.bash
Well, I've tried my solution using just one big status file (splitting it in many files is actually a very bad idea that would lead to extremely long run times - days at least). So I used:
It took about 2.7GB of ram to load the status array (so about two times the file size), the files were on a slow green disk and the CPU was clocked at 1.6GHz.
The script apparently works, but it's slow: 45 minutes.
Hi,
here is my problem:
I've got a file with 6 columns (file1):
a b c d e f
a b c d e f
a b c d e f
a b c d e f
I need to add 1 million columns to this file, each column needs to be a zero.
Here is how the result file (file2) should look like (for the sake of the example, I've only... (7 Replies)
Hi,
one of the server, log directory was never cleaned up. We have so many files. I want to remove all the files that starts with dfr* but I get error message when I use the *.
rm qfr*
bash: /usr/bin/rm: Arg list too long
I am trying to write this script but not working.
... (4 Replies)
I have a log file that is about 1.2 million lines long and about 300MB.
we need a way to clean up this file and only keep the last few thousand lines.
if i use tail command we run our of memory as the file is too big.
I do have a key word to match on.
example, we want to keep every line... (8 Replies)
Here is an easy game!
I wrote a number between 0 and 20 (that can include 0 and 20) on a piece of paper. I am staring at it now, imagining the number so you can read my mind ;)
Reply once, and only once, with a number from 0 to 20 and the first person to guess it wins 1,000,000 Bits.
... (24 Replies)
hi,
I'm trying to sort a file which has 3.7 million records an gettign the following error...any help is appreciated...
sort: Write error while merging.
Thanks (6 Replies)
Hello,
I have got one file with more than 120+ million records(35 GB in size). I have to extract some relevant data from file based on some parameter and generate other output file.
What will be the besat and fastest way to extract the ne file.
sample file format :--... (2 Replies)