On 17 Jul 99 at 7:27, Howard Schwartz wrote:
> For splitting a file at a specified ``split'' line, dont forget the
> standard Unix utility, csplit, which has been ported to DOS as part
> of the genuish project.
Thanks Howard! I think I will be using CSPLIT.EXE instead of
CHOP.EXE (see previous msg in this thread). Although they both
offer very similar features, I have ran into some *odd* problem with
CHOP. It splits files at unexpected places some times. I have not
traced what caused it - (but I am sure it was not caused by my
commands or choice of string. Although I do have a hunch - and how to
further test it, life is short, so instead of spending time figuring
out when and why the one doesn't work (particularly when there is no
author available for the bug report), I'll just use the other that
does.
> You can find it among the set of gnuish,
> text utilities, complete with its own ``man page'' documentation:
>
>ftp://ftp.simtel.net/pub/simtelnet/gnu/gnuish/gnutut12.zip
Notice: The above gnutut12.zip (640 kb) holds the binaries plus
source for both DOS and OS/2. While in /gnuish/dos_only/ I found
tutl11ax.zip (452 kb) with just the binaries and man pages (no
source). Normally, since I do not need the source ( I do not
compile, don't know how) - I would go for the no-source
distribution. But, since the no-source distribution is one version
number less than the full package - I would normally go for the
highest version number (thus the full package). In this case
though, it seems the no-source distr. is of a later/different
build. Notice the difference in version numbers, exe file size
and time stamps:
/gnu/gnuish gnutut12.zip
csplit man 3036 10.02.92 16.12
csplit exe 37771 10.02.92 16.52
(all source files all had same date stamp - or older)
/gnu/gnuish/dos_only/tut111ax.zip
csplit exe 58471 20.03.95 11.08
csplit man 6470 28.02.95 9.18
> There is probably even a 32 bit version, complied with the Delorie
> tools. As usually, program with a Unix history provide more features
> and power and a simple tool.
Reading the README.DOS from tut111ax.zip I notice the author
mention he ported the text utilities with both Microsoft C (version
8.00c) and GNU C (DJGPP 1.12m4), out of which he preferred the
former - the latter port not being distributed. This I guess could
explain the difference of the binaries in the two, leaving the
impression the MS C is able to include some features from the UNIX
versions the other ports can not. But then again, I'm not a
programmer - so I wouldn't know :-))
> csplite.exe can split files at a line,
> you can specify that the lines be split at an ofset (that is, split
> at, for instance, 3 lines after the target ``split line'' etc.). You
> can specify the line using a regular expression (but you dont have
> to). You can specify multiple, different lines to split the file
> at, etc. etc.
I believe the combination of regular expression w/ offset value will
prove very handy.
> From the man page:
I found the man page somewhat confusing...but maybe so since I am not
used to UNIX syntax and options - and since the man page seems to be
(more or less) a copy of the UNIX page. After some trial and error I
noticed the TXTUTIL.INF (in tutl11ax.zip) which explains some of the
things I did not understand at first. ( I'm used to the *INF format
from Windows - so I did not expect to find any *user-info* in it.)
I'm not sure I understand all the options and syntax yet, but I
guess I will figure it out with some trial and error. Just as test
- I split the simmtel index into one file for each directory listing
with
csplit -fsim -n4 -k simms.txt //msdos// {*}
This produced 175 files, named sim0000 through sim0174. The first
file, sim0000 - contained just the intro headers, so when discharged
- it left me with 174 in all - which is just right:).
All the best,
Bjorn
To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.