V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
qw7692336
V2EX  ›  问与答

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

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