【问题标题】:Is there a way to pipe the results of bundle show jquery-rails into gnome-open?有没有办法将 bundle show jquery-rails 的结果通过管道传输到 gnome-open 中?
【发布时间】:2012-07-20 15:30:13
【问题描述】:

我查看了几个在 linux 命令行中使用 pipe 的在线帮助页面,但我无法得到任何工作。我对什么会起作用的最佳猜测如下:

bundle show jquery-rails | gnome-open

但它失败了。相反,如果我运行bundle show jquery-rails,然后复制结果,然后键入gnome-open,然后粘贴,它工作正常。有没有办法将它组合成一个我可以从命令行运行的步骤?

背景

如果您想了解我为什么关心,请查看以下问题:How do I browse the source code for a gem in Rails3 with RVM (linux & gedit)

【问题讨论】:

    标签: command-line terminal bundler pipe


    【解决方案1】:

    正如question you posted on Ask Ubuntu 中所述,您需要使用子命令。

    gnome-open "$(bundle show jquery-rails)"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-04
      • 1970-01-01
      • 2012-11-30
      • 2016-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多