LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   extra linefeeds - terminal (https://www.linuxquestions.org/questions/linux-general-1/extra-linefeeds-terminal-293019/)

k1mgy 02-21-2005 12:14 PM

extra linefeeds - terminal
 
I feel so dumb asking this question but I hope I will be excused based on the fact that I've done a lot of reading about termcap and the linux terminal in general and cannot seem to find even a hint as to what's going on.

System: embedded unit (axis etrax) running kernel 2.4.26. Shell is ash (busybox implementation of bash).

Issue: Extra linefeed is interpreted by host system when sending CRLF.

There are two ways I access the embedded device.

1 - through the serial (root) console.
2 - through a telnet connection

Method 1: I use terraterm for the serial connection. It has a "new line" setting.

New Line Result
SEND CR Single Linefeed
SEND CRLF Double linefeeds

Method 2: I use putty for a telnet (port 23) connection to the embedded box. It has a setting "Return key sends telnet new line instead of ^M (chr 13, or CR).

Send New Line Result
ON (send LF) Double linefeeds
OFF (send ^M) Single linefeed

Naturally if I add a linefeed (the first setting) I'll get two on the host.

What I don't understand is that, on for example one of my Fedora Core 3 boxes, using the same putty connection, I get a single LF regardless of this setting! It seems that somehow the termcap file perhaps is stripping out the CR or is NOT converting it to a LF, whereas on the embedded system, something is. One problem: the termcap files used appear identical to me (using the linux terminal in each).

Also, since updating busybox and basically rebuilding the kernel, etc., my embedded system now exhibits this double linefeed problem where it did not before.

So, where to begin? I've read about termcap, bash (but I don't think this is where the issue is handled) and terminals in general.

It's not a big deal as I can get around it with the putty setting, but when using a dos command shell and running windows telnet the only way to work things is to send a manual chr 010 (alt keyboard trick).

Suggestions (and scorn) gleefully accepted.


All times are GMT -5. The time now is 12:47 AM.