i wrote following script to test getline
BEGIN{
while ( "who" | getline > 0)
nr++
print nr
}
when i run this script as
awk -f scriptname
i get the following output
awk: syntax error near line 2
awk: illegal statement near line 2
please let me know what is going wrong:confused: