How to use loops in awk

Posted by bob on Nov 25, 2019 8:17 PM EDT
Opensource.com
Mail this story
Print this story

Awk scripts have three main sections: the optional BEGIN and END functions and the functions you write that are executed on each record. In a way, the main body of an awk script is a loop, because the commands in the functions run for each record. However, sometimes you want to run commands on a record more than once, and for that to happen, you must write a loop. There are several kinds of loops, each serving a unique purpose. read more

Full Story

  Nav
» Read more about: Story Type: News Story

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.