为什么 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会使用 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.