TangMonk
V2EX  ›  问与答

unix 的 '@' 是啥意思?

  •  
  •   TangMonk · Jul 23, 2014 · 2915 views
    This topic created in 4406 days ago, the information mentioned may be changed or developed.
    在学 unix 的 make 命令,其中:

    # 加 @ 符号

    Makefile:

    hello: ; @echo "hello"

    输出:

    $ make
    hello

    # 不加 @

    $ make
    echo "hello"
    hello

    为啥捏
    1 replies    2014-07-23 16:25:33 +08:00
    churchmice
        1
    churchmice  
       Jul 23, 2014   ❤️ 1
    makefile里面的@是用来suppress command的
    不加@会把要执行的command也打出来,洁癖患者可以加@让这个command不打出来
    顺便这是makefile的东西,不是unix的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2351 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:27 · PVG 08:27 · LAX 17:27 · JFK 20:27
    ♥ Do have faith in what you're doing.