qw7692336
V2EX  ›  问与答

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

  •  
  •   qw7692336 · Jul 19, 2015 · 1742 views
    This topic created in 4104 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   ·   Privacy   ·   Solana   ·   953 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 21:34 · PVG 05:34 · LAX 14:34 · JFK 17:34
    ♥ Do have faith in what you're doing.