如何在gnu屏幕中切换CR/LF? [英] How to toggle CR/LF in gnu screen?

查看:171
本文介绍了如何在gnu屏幕中切换CR/LF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用屏幕从串行控制台读取文本.问题在于输出似乎只包含换行符\ n而没有回车符\ r,因此显示如下:

I'm using screen to read the text from a serial console. The problem is the output seems to only have newline \n but not carriage return \r, so the display looks like this...

Line1
     Line2
          Line3

我想知道是否有任何补丁可以解决此问题?

I wonder if there is any patch to fix this issue?

推荐答案

尝试stty onlcr.

手册页表示它将把换行符转换为输出中的回车符/换行符对,这似乎就是您所需要的.

The man page says it will translate newlines to carriage return / newline pairs on output, which seems to be what you need.

这篇关于如何在gnu屏幕中切换CR/LF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆