AWK:man awk对BEGIN的执行解释木有看懂

没有读懂加粗的这句话在说什么,是说BEGIN{aaa}{bbb}和BEGIN{aaabbb}是等价的意思吗?

BEGIN and END are two special kinds of patterns which are not tested against the input. The action parts of all BEGIN patterns are merged as if all the statements had been written in a single BEGIN block. They are executed before any of the input is read.

阅读 2.6k
1 个回答

BEGIN{aaa} BEGIN{bbb}等价于BEGIN{aaa;bbb}

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题