Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Split a file into pieces

Aug
1,917
68
In Linux, I can use the split command to split a file into pieces. For example;

readme.txt has 7 lines.
Code:
split -l 1 readme.txt

...would create 7 files, with each file containing line x of readme.txt thus;
Code:
File xaa <- Line 1
File xab <- Line 2
File xac <- Line 3
File xad <- Line 4
File xae <- Line 5
File xaf <- Line 6
File xag <- Line 7

This can be accomplished in TCC using the TPIPE command. Using the same file as above;
Code:
tpipe /split=2,0,0,0,0,1 /input=readme.txt

...would create 7 files, with each file containing line x of readme.txt thus;
Code:
File readme.txt.000 <- Line 1
File readme.txt.001 <- Line 2
File readme.txt.002 <- Line 3
File readme.txt.003 <- Line 4
File readme.txt.004 <- Line 5
File readme.txt.005 <- Line 6
File readme.txt.006 <- Line 7

Review TPIPE in the help file for other /split options.

Joe
 
Back
Top