Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
cokebar
V2EX  ›  Linux

shell script 的问题求助

  •  
  •   cokebar · Mar 16, 2017 · 2693 views
    This topic created in 3348 days ago, the information mentioned may be changed or developed.

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

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

    就是[ -t 1 ], 没看懂

    1 replies    2017-03-16 16:54:20 +08:00
    aa65535
        1
    aa65535  
       Mar 16, 2017
    http://xiaowang.net/bgb-cn/ch07.html

    [ -t FD ] 如果文件描述符 FD 打开且指向一个终端则为真。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2980 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 14:48 · PVG 22:48 · LAX 07:48 · JFK 10:48
    ♥ Do have faith in what you're doing.