为什么 rlwrap 会因冗余输出而使屏幕变得混乱?

发布于 2024-10-08 01:55:36 字数 758 浏览 0 评论 0原文

可能的重复:
为什么 rlwrap 会“冗余”回显我从键盘输入的内容??

我在linux下使用rlwrap实用程序在使用sql * plus时进行命令行编辑。一切都很好,只是该实用程序会回显我从键盘输入的每个命令。例如,假设我在提示中输入此语句:

SQL> select last_name from employees

相同的语句将在终端中再次回显,使输出看起来像:

SQL> select last_name from employees
select last_name from employees

然后当我完成下一行的 select 语句时,输出将如下所示:

SQL> select last_name from employees
select last_name from employees
2 where department_id = 100;
where department_id = 100;

问题是,对于较大的查询,这种冗余会使终端混乱,使查询难以阅读,因此任何抑制不必要输出的建议将不胜感激。

Possible Duplicate:
Why rlwrap echos “redundantly” what I type from the keyboard ??

I am using the rlwrap utility under linux for command line editing while using sql*plus. Everything is fine except that the utility echoes every command I enter from the keyboard. For example suppose that I typed this statement in the prompt:

SQL> select last_name from employees

the same statement would be echoed again in the terminal making the output looks like:

SQL> select last_name from employees
select last_name from employees

then when I complete the select statement on the next line, the output would look like:

SQL> select last_name from employees
select last_name from employees
2 where department_id = 100;
where department_id = 100;

The problem is, with larger queries, this redundancy will clutter the terminal making the query hard to read, so any suggestions to suppress the unnecessary output would be really appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原野 2024-10-15 01:55:36

我会使用 SQLPlus 的 SPOOL 指令 来保存输出,而不是 rlwap到一个文件。根据复杂性,可能需要先编写查询/查询脚本以归档...

不知道这是一个重复的问题 - 复制/粘贴到原始文件。

Rather than rlwap, I'd use SQLPlus' SPOOL directive to save output to a file. Depending on the complexity, might want to script the query/queries to file first...

Didn't know this was a dupe question - copy/pasted to original.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文