#!/usr/bin/awk -f
{
	print "\n*** " ENVIRON["_"] " ***";

	command[1]="date +'%H %Z' --date='20140922 0700'"; comment[1]="1 the first call works allways";
	command[2]="date +'%H %Z' --date='20140922 0700'"; comment[2]="2 same as 1, will not work";
	command[3]="date +'%H %Z' --date='20140922 0700'"; comment[3]="3 same as 1, will not work";

	for( i=1 ; i<=3 ; i++ ) {
		buf= "";
		retval= (command[i] | getline buf);
		print "command:<" command[i] ">\tretval:<" retval ">\tbuf:<" buf ">\t#" comment[i];
	}
}
