Re: [Freedos-user] TEE truncates file
Jose Antonio Senna wrote: I tested TEE with commands like DIR C: |TEE CDIR MEM /d /f /x |TEE MAP and it always truncates the files,that is,some lines that appear last on screen do not appear in the file. I think this rules out the possibility of screen output being a mix of stdout and stderr. Can it be that TEE makes some copy mistake ? This happens under kernel 2035, kwc38616 and also under DrDOS. Regards JAS Just getting back to this ... a month late. My bad. Ugh, I just looked at my TEE 1.0 source code, and it's fugly. Sorry about that. But at least it's easy to follow: After TEE find the output file name, it calls outtee() like this: outtee (stdin, pFile, stdout); Where 'pFile' is the file that you want to save a copy of stdin to. I don't know why I write outtee() as a standalone function, cause it's so short and simple. I wrote this when I was a student. Anyway, the outtee() function just does this (brackets added for readability): while ((ch = fgetc (pIn)) != EOF) { if ((fputc (ch, pSave) == EOF) || (fputc (ch, pOut) == EOF)) { return (FALSE); } } return (TRUE); That is, outtee() will keep reading a character at a time from stdin (passed as 'pIn') until it reaches EOF. As it reads, it saves a copy of the input to 'pSave' and prints a copy to 'pOut' (this is written as saving a copy of the character to two output streams.) If there's an I/O error while writing to 'pSave' (i.e. disk full) or if there's some problem writing to stdout, then it quits. I/O buffering could get in the way of this, I suppose. -jh -- I'm sorry my president's an idiot. I didn't vote for him. --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
[Freedos-user] TEE truncates file
I tested TEE with commands like DIR C: |TEE CDIR MEM /d /f /x |TEE MAP and it always truncates the files,that is,some lines that appear last on screen do not appear in the file. I think this rules out the possibility of screen output being a mix of stdout and stderr. Can it be that TEE makes some copy mistake ? This happens under kernel 2035, kwc38616 and also under DrDOS. Regards JAS --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] TEE truncates file
Jim Hall wrote: >It's possible that some of the output you see on screen was printed to >stderr. TEE only works with output printed to stdout (that is, it only >reads stdin.) >stderr is often used to print warnings or error messages. I don't think so,because the output is one continuous transcript of the dialog between TCPMAIL and the POP/SMTP server,and there are no reasons why those lines should have been treated differently. However,how can I test it? I also noticed there is no screen output for a time,then all output is displayed without pause,while TCPMAIL without redirection sends the output to screen as the dialog proceeds. So,probably,everything is redirected to a temporary file until TCPMAIL exits and then TEE takes over and sends the file contents to screen, afterwards copies the file to a permanent one and exits. Is it so? If yes,could it be that TEE makes some copy mistake ? Regards JAS --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] TEE truncates file
Jose Antonio Senna wrote: I have been using Tee to display and save output of a SMTP/POP client named TCPMAIL. One example of command line is: C:\!NET\TCPMAIL.EXE /q /d [EMAIL PROTECTED] |C:\UTLS\TEE .\MAIL.LST and noticed that it truncates the file (that is,some lines - perhaps 10 - that appear last on screen are not saved to file) This does not depend on filename nor on the tcpmail switches I use. If I use standard DOS redirection (> or >>),it saves OK the output (but then I get no screen output,of course). Did anybody notice a similar problem ? Regards JAS It's possible that some of the output you see on screen was printed to stderr. TEE only works with output printed to stdout (that is, it only reads stdin.) stderr is often used to print warnings or error messages. -jh -- I'm sorry my president's an idiot. I didn't vote for him. --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
[Freedos-user] TEE truncates file
I have been using Tee to display and save output of a SMTP/POP client named TCPMAIL. One example of command line is: C:\!NET\TCPMAIL.EXE /q /d [EMAIL PROTECTED] |C:\UTLS\TEE .\MAIL.LST and noticed that it truncates the file (that is,some lines - perhaps 10 - that appear last on screen are not saved to file) This does not depend on filename nor on the tcpmail switches I use. If I use standard DOS redirection (> or >>),it saves OK the output (but then I get no screen output,of course). Did anybody notice a similar problem ? Regards JAS --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Tee
Jim Hall wrote: Jose Antonio Senna wrote: Would anybody provide a link to the FreeDOS tee utility ? There is no file by that name in ibiblio.org directory Regards JAS I'll also make sure a copy is mirrored on ibiblio, but the original is here: http://www.freedos.org/jhall/freedos/utils/ Mirrored on ibiblio: http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/file/ -- _ I'm sorry my president's an idiot. I didn't vote for him. --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Tee
Jose Antonio Senna wrote: Would anybody provide a link to the FreeDOS tee utility ? There is no file by that name in ibiblio.org directory Regards JAS I'll also make sure a copy is mirrored on ibiblio, but the original is here: http://www.freedos.org/jhall/freedos/utils/ -jh -- _ I'm sorry my president's an idiot. I didn't vote for him. --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Tee
Jose Antonio Senna wrote: Would anybody provide a link to the FreeDOS tee utility ? There is no file by that name in ibiblio.org directory Regards JAS http://rpmfind.net/linux/RPM/PLD/dists/ra/PLD/i386/PLD/RPMS/dosemu-freedos-util-beta7h01-3.i386.html http://www.jpsdomain.org/windows/win-tools.html Possible links? TomLeeM/BDG --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Tee
Jose Antonio Senna schreef: Would anybody provide a link to the FreeDOS tee utility ? There is no file by that name in ibiblio.org directory Regards JAS http://www.freedos.org/freedos/software/lsm.cgi?q=v&a=util/tee.lsm Bernd --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
[Freedos-user] Tee
Would anybody provide a link to the FreeDOS tee utility ? There is no file by that name in ibiblio.org directory Regards JAS --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user