【问题标题】:How can I run a command in a remote xterm?如何在远程 xterm 中运行命令?
【发布时间】:2013-12-16 10:43:48
【问题描述】:

在一个 cshell 脚本中,我衍生出一个 xterm。从执行脚本的 shell,我希望在从脚本中分离出来的 xterm 中执行一个命令(例如:banner master win)。

你能给我一个方法吗?

在这种情况下,您认为寻找 xterm 的付费对我有帮助吗?

【问题讨论】:

    标签: shell pid csh xterm


    【解决方案1】:

    只需在启动 xterm 时使用 -e 参数

    来自xterm --help的输出

    [-e command args ...]
    

    因此运行以下命令将启动一个 xterm 以针对日期程序运行 watch 命令,并带有合适的标题:

    xterm -T "Date" -e watch date &
    

    【讨论】:

    猜你喜欢
    • 2019-11-02
    • 1970-01-01
    • 2014-09-11
    • 1970-01-01
    • 2017-10-04
    • 2020-09-03
    • 1970-01-01
    • 2021-02-10
    • 2014-10-07
    相关资源
    最近更新 更多