Awk

Thomas Ravnholt ezra at daimi.aau.dk
Thu Mar 7 21:54:20 AEST 1991


Hello !

  I have a little question about awk (nawk).

  If I want to run a unix-command in an awk-script,
how do I get the output into a variable.

  I tried

     getline < system(unixcommand)

     system(unixcommand | getline)


but it is no good of course. system returns 0 or 1 and
not the output of the unixcommand.

Hope you can answer this one.

Thanks in advance !

                   ezra at daimi.aau.dk



More information about the Comp.unix.programmer mailing list