|
|
The built-in function system(command-line) executes the command command-line, which may be a string computed by, for example, the built-in function sprintf. The value returned by system is the return status of the command executed.
For example, the program
$1 == "#include" { gsub(/[<>"]/, "", $2); system("cat " $2) }calls the command cat to print the file named in the second field of every input record whose first field is #include, after stripping any <, >, or " that might be present.