The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
3answers
55 views

How do I break up a file like split to stdout for piping to a command?

I have a large .sql file full of SELECT statements that contain data I want to insert into my SQL Server database. I'm looking for how I could basically take the file's contents, 100 lines at a time, ...
0
votes
2answers
59 views

Bash split a list of files

I have 200 files in a folder like: test_1_cfg.dat, test_2_cfg.dat,.... and so on. I need to include in a bash script the first 40 files as input and run some process, another script to read the next ...
3
votes
2answers
30 views

TAR: better to skip directory or use split

I've got a file.tar.gz that I create and backup to Amazon S3. It's gotten bigger than Amazon's limits and thus has not been backing up. This is my current command: tar -cpzf file.tar.gz directory/ ...
5
votes
3answers
97 views

The ERE regex to split() string between a delimiter and end-of-word

I'm using a long gawk 3.1.6 script to do a complex conversion of Zim markdown text into GtkDialog code and am stuck on the following problem... Sample ASCII input... [[link|label label]] [[link]] ...
1
vote
3answers
112 views

Is it possible to split file and append the pieces with same extension in one liner?

I did it in two commands --- one for splitting, and one for moving. I can't seem to find my way around it such as to have it all done with one line. What I did was: split.exe --bytes=2300k -d ...
1
vote
1answer
85 views

Can I split a avi file into 2 valid (watchable) files with only standard unix commands?

The question is self explanatory. I have a very big movie file, I want to split it in 2. How can I do this?
2
votes
2answers
78 views

What are the differences between split and rar?

I am used to raring files -- but I am looking for something faster. I see that there is a "split" command. How does this command compare to rar? What is are the differences between split and rar?
5
votes
3answers
127 views

Robustly segmenting a csv file containing noisy data

Say I have a csv file with these columns: timestamp,cpu,memory An example of the shape of the actual data would be this chart: Having the data visualized in this way, it's easy for the human eye ...
1
vote
1answer
113 views

Binary search for a failing line

git has bisect run to figure out which revision an error was introduced. I have a big file (100GB) and at least one of the lines is bad, but the program I have to check it with will not tell me which ...
2
votes
1answer
90 views

Emacs - finding the cursor in multiple windows

I've started splitting my emacs frame into two side-by-side windows, but often I'm unable to tell at a glance which window the cursor is currently in. I've bound the other-window command to a special ...
2
votes
3answers
245 views

Splitting a large binary file into sections determined by context patterns

I have a large (2GB) file that looks like this: ^%%-=-=-=-=-=-=-=-=-=-=-=-=-=-%%^ <binary data> ^%%-=-=-=-=-=-=-=-=-=-=-=-=-=-%%^ <binary data> ^%%-=-=-=-=-=-=-=-=-=-=-=-=-=-%%^ ...
4
votes
5answers
542 views

How to split a file by using keyword boundaries

I have a vcf file that contains numerous vcards. When importing the vcf file to outlook it seems to only import the first vcard. Hence I want to split them up. Given that a vcard starts with ...
4
votes
3answers
705 views

Split file into multiple small files, separate by the newline symbol

Is there a utility that split file by newline symbol? e.g if a file contains the following lines, aa bbb cccc If I want to split it to 3 files, the desired output would be: aa, bbb And cccc (in 3 ...
3
votes
3answers
798 views

Split PDF into documents with several pages each

There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into ...
4
votes
4answers
582 views

How can I split a large text file into chunks of 500 words or so?

I know there's the command split which can split a file into several chunks based on file size, and then there's the command wc which can count words. I just don't know how to use the two together.
4
votes
4answers
433 views

Using GNU Parallel With Split

I'm loading a pretty gigantic file to a postgresql database. To do this I first use split in the file to get smaller files (30Gb each) and then I load each smaller file to the database using GNU ...
0
votes
2answers
870 views

Why screen is not splitting my GNOME terminal?

I am working in a remote Linux box using VNC.I have a single terminal with lots of tabs opened in my system. How can I split them using the screen utility? Does the screen utility work with already ...
4
votes
2answers
1k views

What's a safe and portable way to split a string in shell programming?

When writing a shell script, I often want to split a string. Here's a very simple example: for dir in $(echo $PATH | tr : " "); do [[ -x "$dir"/"$1" ]] && echo $dir done This will ...
5
votes
3answers
409 views

Tar piped to split piped to scp

So I'm trying to transfer a bunch of files via SCP. Some of these are too large to be stored on the recipient (Android phone, 4GB file size limit). The sender is almost out of space, so I can't ...
1
vote
1answer
489 views

Reading the contents of the file and splitting using ksh

We're using a ksh script for installing one product. I've another config file, I'd need to read this configuration file from my main script Content of the Configuration file: ...
2
votes
1answer
662 views

How to split a ddrescue disk image and how to use it again?

I have a 500GB external HDD that I need to rescue the contents of. Unfortunately I only have two 400GB partitions to save the contents to. Can I split the disk image as: ~$ cd /mnt/part1/Recovery/ ...
3
votes
0answers
59 views

gnu screen: automatic session on split

Inactive region appears after 'split' command in gnu screen now. You must go to the new region and type :screen. Only after that shell session appears in this region. Is it possible to make new ...
0
votes
1answer
294 views

Split large txt file into certain small file

I have a txt file which is formatted as 250,000 * 3600 (3600 rows and 250,000 column) I am going to split it into 3600 small txt which each file is 250,000 * 1. I understand the split can basically ...
3
votes
4answers
17k views

Splitting string by the first occurrence of a delimiter

I have a string in the next format id;some text here with possible ; inside and want to split it to 2 strings by first occurrence of the ;. So, it should be: id and some text here with possible ; ...
7
votes
4answers
498 views

Creating a single output stream out of three other streams produced in parallel

I have three kinds of data that are in different formats; for each data type, there is a Python script that transforms it into a single unified format. This Python script is slow and CPU-bound (to a ...
11
votes
8answers
720 views

Spreading stdin to parallel processes

I have a task that processes a list of files on stdin. The start-up time of the program is substantial, and the amount of time each file takes varies widely. I want to spawn a substantial number of ...
2
votes
2answers
626 views

splitting the array and send the values to hashset in awk

I am getting var as argument from shell script to awk awk -v var = "blah1|blah2|blah3" -f awk_script.awk I need to put each blah's into a hashset, currently, I am doing it like this. I am getting ...
5
votes
4answers
3k views

Split a file by line and have control over resulting files extension

There is a standard command for file splitting - split. For example, if I want to split a words file in several chunks of 10000 lines, I can use: split -dl 10000 words wrd and it would generate ...
0
votes
0answers
48 views

Backing up to DVD [duplicate]

Possible Duplicate: Splitting large directory tree into specified-size chunks? I have a partition that is about 14G and I need to back it up to DVD in such a way that I can use each disc to ...
4
votes
3answers
369 views

Is it possible to use split to make character chunks out of Chinese unicode bytes?

For a while, I've been dealing with Chinese unicode text. Of course, the usual rules apply. I can grep for characters the same way I'd do so for words. This is very useful to me. But there's one ...
12
votes
4answers
10k views

What's the best way to join files again after splitting them?

If I have a large file and need to split it into 100 megabyte chunks I will do split -b 100m myImage.iso That usually give me something like xaa xab xac xad And to get them back together I have ...
1
vote
1answer
200 views

Split is not available?

I've just tried to run a simple shell script on my Readynas server running Debian, and it appears that the split command is not available. This is a server which I can't fiddle too much with, so if ...
6
votes
2answers
3k views

Can I automate tar's multi-volume-feature?

Ok, so I've just had a read through this page after a way to improve my current backup solution on my Debian server. Tar seems to be offering a quite nice multi-volume feature, although when I try it ...
2
votes
2answers
489 views

Is there a way to split a HTML file without losing all the formatting within each segment?

So... the split command allows me to split a file into pieces. The problem with that, though, is that only one of the files is going to contain the HTML headers, and only one of them is going to ...
0
votes
1answer
867 views

Cloning/Splitting a serial port (COM) port in Ubuntu

Everything is working with my serial port. I have connected my FTDI converter into my computer, set my COM port... ln -s /dev/ttyUSB0 ~/wine/dosdevices/COM1 But now I would like to "clone" this port. ...
3
votes
1answer
766 views

Split: how to split into different percentages?

How can I split a text file into 70% and 30% using the split command ?
8
votes
7answers
3k views

Splitting large directory tree into specified-size chunks?

I have a directory tree that I would like to back up to optical disks. Unfortunately, it exceeds the size of any one disk (it's about 60GB). I am looking for a script that would split this tree into ...
8
votes
1answer
336 views

K3b to split volume across media

How do I get K3b to split a volumes across several media? For example if I give it a folder that has 6 GB (not one file of 6 GB), it should create several discs of 4.4 GB automatically, instead of me ...
11
votes
3answers
3k views

Break a large file into smaller pieces

How do I break a large, +4GB file into smaller files of about 500MB each. And how do I re-assemble them again to get the original file?