filesplitting

Splitting a file and its lines under Linux/bash

I have a rather large file (150 million lines of 10 chars). I need to split it in 150 files of 2 million lines, with each output line being alternatively the first 5 characters or the last 5 characters of the source line. I could do this in Perl rather quickly, but I was wondering if there was an easy solution using bash. Any ideas? ...

How does Mercurial handle splitted files?

How does mercurial handle splitted files? What will happen if I create a branch and split a file. Can I easily pull changes from another branch which modifies the original, unsplitted file? ...

How to split file on first empty line in a portable way in shell (e.g. using sed)?

I want to split a file containg HTTP response into two files: one containing only HTTP headers, and one containg the body of a message. For this I need to split a file into two on first empty line (or for UNIX tools on first line containing only CR = '\r' character) using a shell script. How to do this in a portable way (for example us...

WAV file splitter utility

I have a PROGRAMMING task (homework) to investigate brute force neural net methods. That part of the problem is MY homework. We have to show that certain simple words repeated in a verbal conversion might be able to be recognized as similar. We don’t have to workout what the word is, just that it is a possible repeat. To limit my ‘searc...

A way to split a huge XML file into smaller xml files with XSL

Hi, I get a huge XML file containing a list of TV broadcasts. And I have to split it up into small files containing all broadcasts for one day only. I managed to to that but have two problems with the xml header and a node being there multiple times. The structure of the XML is the following: <?xml version="1.0" encoding="UTF-8"?> <br...

How to file split at a line number

I want to split a 400k line long log file from a particular line number. For this question, lets make this an arbitrary number 300k. Is there a linux function that allows me to do this? I know split lets me split the file in equal parts either by size or line numbers but that's not what I want. I want to the first 300k in one file and...