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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a file using awk and sed

Status
Not open for further replies.

ryanildo

Programmer
Jun 26, 2002
5
US
I need help entering a file so that the script I have will perform it's functionality. Currently, the script looks like this:

BEGIN{
FS=";"
}

NF !=9 {
printf("%s : %d\n", FILENAME, FNR);
}

vlad

#include<disclaimer.h>



I basically want to run the script and test a file named ftpoutbound.db . Can anyone help me with the steps I need to take to kick off the script and have it check that specific file. Thanks in advance for any help.
 

Assuming the script below is saved in ftpoutbound.awk file, run it as:

nawk -f ftpoutbound.awk ftpoutbound.db

#------- ftpoutbound.awk ---------
BEGIN{
FS=&quot;;&quot;
}

NF !=9 {
printf(&quot;%s : %d\n&quot;, FILENAME, FNR);
}


#------- ftpoutbound.awk --------- vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top