How to Split a large file according to the same aggregated files
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Unless you have some way of identifying, within the bigfile.txt, where a file's contents begin and start I would think your pretty buggered. As far as I am aware cat will not
have placed any delimiters in the file.
Are you able to provide any more information on whether or not you have any way to tell where data starts and stops?
where first three files stand for 2015 Jan 1(2015/01/01), 6 UTC, 12 UTC, 18 UTC respectively. I did aggregate them together to perform some overall verification analysis. For space sake, I deleted individual files. Mistake!
Now I need to split this again, and later subset according to each UTC.
You are presuming the data has the format as the filename - or contains the (original) filename. Pretty big assumption. Lets see the first 20 lines - presuming common data format in the initial files.
Code:
head -n 20 bigfile.txt
Last edited by syg00; 08-17-2015 at 07:50 PM.
Reason: filename
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.