Console adds extra line if text reaches console window width

Discussion in 'Scripting' started by Yong Huang, Dec 14, 2004.

  1. Yong Huang

    Yong Huang Guest

    I shrink my console windows (DOS box) to 30 characters wide. My script
    test.bat has 2 (not 3) lines and contains:
    *** Begin cut ***
    @echo off
    echo 123456789012345678901234567890
    *** End cut ***

    When I run it, I see:
    *** Begin cut ***

    *** End cut ***
    Note the two blank lines after the script output.

    Now I drop one digit on my echo line in test.bat so it looks like:
    echo 12345678901234567890123456789
    and run it. I see:
    *** Begin cut ***

    *** End cut ***
    Now there's only one blank line.

    The same happens if I change the console width to 80 and I echo 80 vs. 79
    digits. I also tried writing this program in Perl (from ActiveState) and
    Python (comes with IBM laptop). It's the same behavior. My console window
    text font is Lucida Console, if it matters.

    Question: Is there any way to tell Console window not to add the extra line
    if the length of the echoed text is the same as the window width?

    Yong Huang
    yong321 @
    Yong Huang, Dec 14, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.