V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
cokebar
V2EX  ›  Linux

shell script 的问题求助

  •  
  •   cokebar · 2017-03-16 16:44:08 +08:00 · 1855 次点击
    这是一个创建于 2588 天前的主题,其中的信息可能已经有所发展或是发生改变。

    目前正在学习 shell script ,不过碰到如下一行没看懂: https://github.com/Neilpang/acme.sh/blob/master/acme.sh#L102

    __INTERACTIVE="" if [ -t 1 ]; then __INTERACTIVE="1" fi

    就是[ -t 1 ], 没看懂

    1 条回复    2017-03-16 16:54:20 +08:00
    aa65535
        1
    aa65535  
       2017-03-16 16:54:20 +08:00
    http://xiaowang.net/bgb-cn/ch07.html

    [ -t FD ] 如果文件描述符 FD 打开且指向一个终端则为真。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   947 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 21:35 · PVG 05:35 · LAX 14:35 · JFK 17:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.