home *** CD-ROM | disk | FTP | other *** search
-
- Historique
- ----------
-
-
- ------------------
- «««« Split 1.2 »»»
- ------------------
- - Yves Perrenoud -
- - 10.09.1991 -----
- ------------------
-
-
- ------------------------------------------------------------------------------
- - V1.0 : Base version, which only lets you extract and not realy split, -
- - no bugs found. -
- ------------------------------------------------------------------------------
- - V1.1 : Added the option to split the file in x parts of a size -
- - specified by the user, or in a specified number of parts. -
- ------------------------------------------------------------------------------
- - V1.2 : Added multi file join. -
- ------------------------------------------------------------------------------
-
-
-
- Split Version 1.2
- Written by Yves Perrenoud
- Copyright © 1991
- All Rights Reserved.
-
-
-
-
- Disclaimer :
- ------------
-
- I am NOT responsible for anything this program does; you are using it
- enterily at your own risk.
-
- This program is freely distributable for non-commercial use, provided a
- small credit note or a thank-you is included in the readme file.
-
- Description :
- -------------
-
- This program lets you split a file in several different ways or join
- several files together.
-
- The spliting part of the program is, as the title expresses, the main
- reason for which I wrote this. So all the aims I had previously fixed
- myself are now implemented. This is not the case for the join part,
- which still lacks a couple of options (see future enhancements). So
- here is a descripiton of the spliting facility, or should I say
- extracting :
-
- - You can extract a specified amount of bytes anywhere in a file and
- optionaly save what rests.
-
- - Split a file in two parts and only specify the size of the first
- chunk.
-
- - Extract a certain amount of bytes from the beginning of the file.
-
- - Split a file in a certain amount of parts or in chunks of a
- specified size. The resulting files will have the "_n" extension
- added to the original name.
-
- The joining part is simply a case of joining multiple files together,
- just like the cli command "join". Special features will be added in a
- future release.
-
-
- Detailled description :
- -----------------------
-
- The command is invoked as follows :
-
- Split <Mainfile> {<FileN>} [<options>]
-
- <Mainfile>, is the file you will be spliting or the joined file. The
- fact it must be the first filename on the command line is quite obvious
- when you use the split option, but when joining this can be at first a
- bit confusing; it's just a question of habit.
-
- {<FileN>}, are either the files you are going to join, in which case
- you are only limited by the length of the command line, or the
- resulting files from the split.
-
- [<options>], here is a list of them :
-
-
- The mode you are going to use :
-
- -j : join mode (default).
- -sN : split mode.
-
- The actual options :
-
- -a : maximum buffer.
- -b : buffer size.
- -o : offset (split only).
- -n : size to split in bytes (split only).
- -r : save rest (split only).
- -l : largest buffer.
-
-
- Joining files together :
- ------------------------
-
- When you are in join mode, the only options availiable are "-a -b -l".
- In fact the -a and -l, will have the same effect (which is not the case
- in the split mode) : They will use a buffer which is equal to the
- largest block of memory availiable. To be honest I don't see why this
- option could be of any use to someone, but there you are it's in the
- program. It could maybe speed up things a little when working on big
- files.
-
- Of course the -b option is to set the buffer to a specific size, the
- default value is 50'000 bytes. To join several files together you
- simply type split followed by the name of the destination file, and
- then you type the name of the different files you which to join
- together. there must be at least one file, in which case split will
- simply copy the file.
-
- Note : If a file which will be created with split already exists, the
- ---- program will ask you for a confirmation before replacing the
- file.
-
- Here is an example of a join :
-
- Split messages_1_250 messages_1_119 messages_120_250
-
- or
-
- Split -j messages_1_250 messages_1_119 messages_120_250
-
- The two are exactly the same since the "-j" is the default. Now a
- multiple file join :
-
- Split 4Months January February March April
-
- Would join January, February, March and April as 4Months.
-
-
-
- Spliting files :
- ----------------
-
- In this mode all the options are used, and for different reasons, so
- "-a" and "-l" concern different things.
-
-
- Buffering :
-
- With "-b" followed by a value in bytes, you will set the buffer to the
- desired size.
-
- If you use "-a", which sets the buffer to the size of the program to
- split (so everything will be done in one pass), and there isn't enough
- memory, the program will warn you of so and advise you to use the "-l"
- option. This options if set in conjunction with "-a", only if there
- isn't enough memory, will set the buffer to the largest block of
- memory. For this you must have the "-l" and "-a" present at the same
- time. If there is only "-l", it will simply be ignored.
-
- Note : If you are joining, you don't have to put them both; one of the
- ---- two will be enough.
-
-
- Exctracting :
-
- "-n" : specifies the amount of bytes to exctract.
- "-o" : is the offset at which the program should start exctracting.
- "-r" : is an option which will save what is rest of the file after the
- exctraction.
-
- So lets say you want to strip the first 2000 bytes of a file called
- "Filename" into a destination file called "DestFile", you would type :
-
- "Split -s Filename DestFile -n2000".
-
-
- Now, you want to extract from a sample which is 1.5mb long, 450'000
- bytes starting at the 800'000th byte. You simply type :
-
- "Split Sample Speech -s -n450000 -o800000".
-
-
- Next, you want to separate the sample in two chunks : one of 76'000
- bytes and the rest which is (1.5mb - 76'000) 972'576; you type :
-
- "Split Sample -s -n76000 -r Introduction MainSequence"
-
-
- And finaly, you have a file which is 32000 bytes long, you want to
- extract 5'000 from the 12'000th byte and save the 15'000 remaining,
- you type :
-
- "Split -s Messages.txt -n5000 -r Description.txt -o12000 Details"
-
-
-
- Spliting files in several parts :
- ---------------------------------
-
- For this you, use the -sN option, where N is either the amount of
- smaller files you want to output or if you add a '#' it will be the
- size of the different files. A "_n" extension will be added the name of
- the file you are spliting for each splited file.
-
-
- Spliting a file called "Garfield.IFF" which is 83'237 bytes long into 5
- different files will be done as follows :
-
- "Split -s5 Garfield.IFF"
-
- "Garfield.IFF" 83'237 bytes ---> "Garfield.IFF_1" 16'648 bytes
- "Garfield.IFF_2" 16'648 bytes
- "Garfield.IFF_3" 16'648 bytes
- "Garfield.IFF_4" 16'648 bytes
- "Garfield.IFF_5" 16'645 bytes
-
- Spliting a file called "Sample" which is 3'000'000 bytes long into
- several chunks of 850'000 bytes long :
-
- "Split Sample -s#850000"
-
- "Sample" 3'000'000 bytes ---> "Sample_1" 850'000 bytes
- "Sample_2" 850'000 bytes
- "Sample_3" 850'000 bytes
- "Sample_4" 450'000 bytes
-
- This is a perfect example of the use of split, divide a huge file in a
- certain number of smaller files which will fit on a disk.
-
-
- Conclusion :
- ------------
-
- Well this is just about it, I don't know what else I could say about
- the program. If you have any suggestions, ideas or simply if you find a
- bug, contact me in one of the ways decribed below. If you like this
- program or find it useful, you could send me a postcard or something so
- I'll know where my program is being used.
-
-
- - The BBSs I use the most frequently :
-
- ACCU : +41 1 860 8913
- AUGL : +41 75 2 1587
- AUGS : +41 62 4 327
- MAGIC : +41 61 98 6843
-
- I will be under Yves Perrenoud or YPerrenoud (AUGS).
-
- - On Fidonet 2:302/906 (Yves Perrenoud)
-
- - USENET : pyves@alphanet.imp.com
-
-
-
- If you don't live in Switzerland, I advise that you use Fidonet to
- contact me or eventually Usenet. Otherwise leave me a message on AUGL
- (Yves Perrenoud), MAGIC (Yves Perrenoud) or one of the BBSs mentionned
- above. Of course you can send me normal mail, see the address below.
-
-
- Yves Perrenoud,
- Traversière 29,
- CH-2013 Colombier,
- Switzerland.
-
-
-
- Future enhancements :
- ---------------------
-
- - Wild card support (for the join part).
-
- - Using a file containing the names of the different files you want to
- join instead of having to type them on the command line. The
- advantage is you're not limited by the length of the command line,
- and also you can use an output from an other program; for example
- list (with the lformat facility).
-
- - Reducing the size of the executable.
-