English 中文(简体)
终端投稿人执行——重复投入的问题
原标题:Terminal emulator implementation - problems with repeated input

我正试图在贾瓦实施一个终点站。 它应当能够在Windows和Bash上安装两厘米的视像仪(我至少要支持短链氯化石蜡和MacOS X)。 我面临的问题是,无论我向标准输入什么,都重复了<代码>cmd.exe和bash的标准产出。

For example, in bash, I type "ls", hit enter, at which point the terminal emulator sends the input line to bash s stdin and flushes the stream. The process then outputs the input line again "ls " and then the output of the ls command.

这是一个问题,因为除<代码>bash 和cmd.exe外的其他方案。 不这样做。 如果我在布什或<代码>cmd.exe内运行,则指令“python -i,则该校正互动剪辑不会重复bash cmd.exe上的投入。 这就意味着,要了解实际产出的完成情况。 我怀疑,实际上的终端设计师做了些什么。

bash -i”的行文不改变这种行为。 如我所知,cmd.exe。 无差别的“互动”和“非互动”模式。


http://www.un.org。 我正在使用<代码>建立东道程序。 工艺品类别。 我阅读了这一过程的中继器和文字,采用与stream gobbler 。 在我开始主办进程之前,我没有确定任何环境变量。 用于启动程序的具体指令一是bash -i for bash and cmd for厘米d.exe。 我试图在我设法树立一个最低的法典榜样。

最佳回答

Unix,pr stty -echo to disable " localrep" (i.e. the shell reing all that You category). 这通常使用户能够洗刷其类型。

就你而言,讲卫生运动必须在某种程度上分配一种假象,否则它不会重复一切指挥。 <代码>+x具有类似效果,但随后,见<代码>+ ls,而不是ls

cmd.exe 指令@ECHO OFF应具有同等效力。

只是执行进程建立后的工作,应当工作。

问题回答

暂无回答




相关问题
Parse players currently in lobby

I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

Bash usage of vi or emacs

From a programming standpoint, when you set the bash shell to use vi or emacs via set -o vi or set -o emacs What is actually going on here? I ve been reading a book where it claims the bash shell ...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Perform OR on two hash outputs of sha1sum

I want perform sha1sum file1 and sha1sum file2 and perform bitwise OR operation with them using bash. Output should be printable i.e 53a23bc2e24d039 ... (160 bit) How can I do this? I know echo $(( ...

Set screen-title from shellscript

Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl+A shift-A Name enter I searched for about an hour on how to emulate ...

热门标签