Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fuchs From: fuchs@it.uka.de (Harald Fuchs) Newsgroups: comp.unix.questions Subject: Re: AWK system and close functions Message-ID: Date: 27 Nov 90 19:51:52 GMT References: <308@amsaa-cleo.brl.mil> Sender: news@ira.uka.de (USENET News System) Organization: University of Karlsruhe, FRG Lines: 14 randy@amsaa-cleo.brl.mil (Randy Sebra ) 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 ... *gulp*