qw7692336
V2EX  ›  问与答

刚刚接触 shell 编程,问点代码问题。

  •  
  •   qw7692336 · Jul 19, 2015 · 1555 views
    This topic created in 3981 days ago, the information mentioned may be changed or developed.

    for i in {1..10}
    {
    echo $i
    }

    n=10
    for i in {1..$n}
    {
    echo $i
    }

    for i in seq 1 $n
    {
    echo $i
    }

    为什么不能for i in {1..$n}

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   961 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 20:16 · PVG 04:16 · LAX 13:16 · JFK 16:16
    ♥ Do have faith in what you're doing.