qw7692336
V2EX  ›  问与答

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

  •  
  •   qw7692336 · Jul 19, 2015 · 1636 views
    This topic created in 4037 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   ·   5888 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 02:32 · PVG 10:32 · LAX 19:32 · JFK 22:32
    ♥ Do have faith in what you're doing.