how to execute shell commands in awk script?

Greetings Friends,

Suppose I wish to invoke some shell level commands inside an awk script how to do that?

say I wish to use : "wc" on a record to count number of characters in a record

Any clues?

Thanks,
Rishi

print | "wc -l"

opens a pipe and sends the whole output line to wc. The pipe stays open and receives input until awk ends.

By the way, length($0) counts all of the chars in a record.