[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cat on win32
Re: cat on win32
Sat, 8 Feb 2003 10:55:38 -0700
> I found doing:
> cat -B filename.* > result.bin
> will give a file little bigger than sum of bytes of single files.
What does the '-B' option do? The GNU version of the command does not
have that option.
What is the size of the resultant file if the -B option is not used?
I would not normally expect to see any option there in your example.
I am guessing that '-B' is a switch between MS 'binary' and 'text'
file modes. I assume they needed to be added for the port. By
convention on MS-Windows programs do linefeed munging on files they
consider text files. It is not possible for programs to determine
when they need to do this automatically and so they frequently need to
be told. Unfortunately since MS has file modes it means that if you
get the modes mixed up it will cause problems there.
For programs that operate only on text files they can be hard coded to
always munge the file. Or if a program only operates on binary files
it can be hard coded not to munge the data. But for general purpose
programs such as con'cat'enate, which on modern systems make no
distinction as to the contents of the file, may need the user running
the command to say whether they want it to munge the data or not.
> If I do, instead:
> copy /B filename.aa + filename.ab /B + ... + filename.ap /B result2.bin
What does the /B option to 'copy' do?
> I have a file that is exactly the result file.
> Maybe something wrong with cat compiled for win32?
> My file was 81.340.416 bytes, splitted with: split -b 5m
> >cat --version
> >cat (GNU textutils) 2.0
You did not say but I am going to guess you are using the Cygwin
Toolkit. In which case let me redirect you to the experts over on the
cygwin lists. I am sure your question has been asked before and they
will know the answer. Please check the faq first and you will
probably find the answer there.
Cygwin Home Page.