qw7692336
V2EX  ›  问与答

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

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