Hey guys,
I ran across something really odd today. I'm summing columns in a flat file, and then running an equivalence check against the cooresponding summed columns.
This is my code for the summing of the columns:
SUM1 += ($CFIELD)*100;
SUM2 += ($CFIELD2)*100;
print(SUM2);
SUM3 +=...
Hey,
I am having an issue with awk rounding numeric variables.
My script is as follows:
function ControlSumSix()
{
while((getline < MYFILENAME)>0) {
COUNT = $CFIELD;
COUNT2 = $CFIELD2;
COUNT3 = $CFIELD3;
COUNT4 = $CFIELD4;
COUNT5 = $CFIELD5;
COUNT6 = $CFIELD6...
The error I was receiving was from the shell, and it was because I was creating a file inside the script which had a naming convention that began with the filepath. Therefore, because a filepath was inside name of the document that I am attempting to create, I was receiving an "file not found"...
it is a windows executable that is created by compiling an awk script.
however, i'm not sure that that that is the essential point. I just want to run an awk script on a file that is located in a different folder. Is there anything I need to write to allow awk to handle this exception?
Okay,
I am attempting to run a compiled awk executable against a file that is in another folder. I tried giving the executable the path of the file, but it gives an error, as if it cannot find the file.
Any ideas?
Thanks for all help.
I have written this leap year regex and checked it with the year 2099 and have gotten incorrect results. Here is my regex:
if((Year%4)==0 && (Year%100 != 0 || Year%400 == 0))
{
ISLEAPYEAR = 1;
}
# Regular expression check, checks each month individually, due to differences in numbers of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.