Hi All,
Is there a way in which AWK reads two files, get a result from each file, and then subtracts file1 result from file2 result.
e.g.
x=/= "RM_[0-9][0-9][0-9][0-9][0-9]/{print substr($3,2,10),substr($3,7,5)}' from file1
y={if($1~/^IP/ && $9~/M_[0-9]/){print substr($9,1,10),substr($9,6,5)}}' | sort -u from file2
res=(x[2]-y[2])
then
{if(res ==3) {----> here we call a system call
}
else {if(res == 2)
{----> here we call a system call}
}
}
}
My x value is Jack_00212 00212
y value is Jack_00210 00210
Many Thanks
Chris
Is there a way in which AWK reads two files, get a result from each file, and then subtracts file1 result from file2 result.
e.g.
x=/= "RM_[0-9][0-9][0-9][0-9][0-9]/{print substr($3,2,10),substr($3,7,5)}' from file1
y={if($1~/^IP/ && $9~/M_[0-9]/){print substr($9,1,10),substr($9,6,5)}}' | sort -u from file2
res=(x[2]-y[2])
then
{if(res ==3) {----> here we call a system call
}
else {if(res == 2)
{----> here we call a system call}
}
}
}
My x value is Jack_00212 00212
y value is Jack_00210 00210
Many Thanks
Chris