【问题标题】:I want to be able to pipe stdout into gist on ubuntu 14.04我希望能够在 ubuntu 14.04 上将标准输出通过管道传输到 gist
【发布时间】:2014-09-04 16:25:08
【问题描述】:

我找不到有关如何执行此操作的任何详细信息。我一直在使用 hastebin *haste gem,当它无法正常工作时,我正在使用 pastebinit。但是 gist 的字符限制要宽松得多,我希望能够在可能的情况下将 stdout 发送到 gist。

我听说某处有一个名为 *wgetpaste 的包,但我不知道如何使用或安装这些包。如果有人能告诉我从哪里开始或如何做到这一点,那就太棒了!

【问题讨论】:

    标签: pipe stdout paste ubuntu-14.04


    【解决方案1】:

    在等待响应时,我发现我可以简单地运行。

    apt-get install gist
    

    当我想输出要点时,我只需像这样使用它。

    cat /home/user/somefile.txt |gist-paste
    

    它返回这个。

    user@one:~$ cat somefile.txt |gist-paste
    https://gist.github.com/f20e4eee087955be59a9
    user@one:~$
    

    【讨论】:

    • 作为说明,自 14.04 起可通过 Ubuntu 中的包管理获得 - 值得信赖 - 但可以手动安装 - 有关 gist cli client github page 的更多信息。
    【解决方案2】:

    尝试以下方法:

    <generate input> | xargs -I {} gist <options> {}
    

    【讨论】:

    • gist 是否与 git 一起安装?
    猜你喜欢
    • 1970-01-01
    • 2017-05-11
    • 2018-04-21
    • 2022-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-25
    相关资源
    最近更新 更多