AWK system and close functions
Harald Fuchs
fuchs at it.uka.de
Wed Nov 28 06:51:52 AEST 1990
randy at amsaa-cleo.brl.mil (Randy Sebra <randy>) writes:
> I have tried unsuccessfully to use the 'system' and 'close'
>functions in an AWK script.
>awk '{ system("ls -lg /etc") }' /dev/null
>awk '{ system("ls -lg /etc > /tmp/list") }' /dev/null
Anything between { and } is executed for each input line (unless a
pattern is specified). Since there are no input lines, nothing is executed.
Besides that, your script is syntactically OK.
--
Harald Fuchs <fuchs at it.uka.de> <fuchs%it.uka.de at relay.cs.net> ...
<fuchs at telematik.informatik.uni-karlsruhe.dbp.de> *gulp*
More information about the Comp.unix.questions
mailing list