Using getline into a Variable from a Pipe code example
Example: Using getline into a Variable from a Pipe
BEGIN {
"date" | getline current_time
close("date")
print "Report printed on " current_time
}
BEGIN {
"date" | getline current_time
close("date")
print "Report printed on " current_time
}