Quote:
FileB file format is as follows: The file will not contain the column names.
SourceName source_date totalcount_fileA filedate,
Hello 12/04/2003 4500 2/04/2003
|
Are you saying that there may be many FileA, and FileB contains the expected record count for each FileA value?
If so, this might help you...
Code:
awk '
{
fname=$1; fcount=$3
"wc -l "fname | getline # this pipes the system call to 'wc'
# the stdout is read in to replace $0
print fname " - Expected count: "fcount"; Actual Count: "$1
}' FileB
Damian