开发者

How to make infinite loop with awk

I have a program:

#!/bin/awk -f
BEGIN {
}
{
        print "hello"       
}
END {
}

It prints hello and then waits for enter to be pressed and then again prints hello. i want to make i开发者_Go百科t infinite without asking for enter. Please comment!


Agreed with @SiegeX

yes | awk '{ print "hello" }'


#!/bin/awk -f

BEGIN{
  while(1)
    print "hello"
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜