O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Set breakpoint

The first thing we should do while running a debugger to investigate a problem, is to put in a breakpoint otherwise the program will run as if it was not under the debugger. The break command or its shortcut, b is used to set the breakpoint with any of the following arguments:

  • break function_ name: Sets the breakpoint at the entry to the first instruction of the function
  • break line-number (n): Sets the breakpoint at the line number n in the current source file
  • break filename:n: Sets the breakpoint at the line number n in the specified source filename

Each breakpoint is designated a number that can be used to delete it from the breakpoint list, using the delete command.

In our example, the file calc.awk has four functions. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required