Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Awk Test script

Status
Not open for further replies.

warmpapi

IS-IT--Management
Nov 15, 2000
42
US
Anyone here ever use awk when writing a script.

We are trying to execute the "system" function call from a script file to execute a program. The program is called and returned because of our print statements referenced in the script, but the program does not execute. We tried calling another script file and still no success. Anybody have any ideas or direction that we could take on this.


Thanks.
 
The format would be system( "unix command")

Here is an example in script of a system function:
[tt]
{
system ( "cat " $1 )
}
[/tt]

In this system function example it takes the command and the value of the first field in the input file as its argument. The cat takes the value of the first field, a filename, as its argument. The shell causes the command to be executed.
 
We figured it out...we are using the nawk command...Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top