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!

Search results for query: *

  1. cgoodman

    Strange carry over in awk summation

    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 +=...
  2. cgoodman

    Awk is rounding numeric variables, any way around it?

    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...
  3. cgoodman

    Running awk script on a file in another folder

    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"...
  4. cgoodman

    Running awk script on a file in another folder

    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?
  5. cgoodman

    Running awk script on a file in another folder

    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.
  6. cgoodman

    Leap Year Regex

    The regular expression is correct, simple mistake. thanks for checking it though. No more help needed.
  7. cgoodman

    Leap Year Regex

    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...

Part and Inventory Search

Back
Top