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 dencom 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: *

  • Users: cgoodman
  • Content: Threads
  • Order by date
  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

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