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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by thunderkid

  1. thunderkid

    Selecting Last Records

    PHV, Works great. Thanks! Have a star! thunderkid
  2. thunderkid

    Selecting Last Records

    How do I use awk to select last record in data below: 23 100 345 F0001 24 400 241 F0002 25 234 213 F0002 30 234 211 F0003 31 212 211 F0003 32 112 211 F0003 26 212 211 F0004 desired format 23 100 345 F0001 25 234 213 F0002 32 112 211 F0003 26 212 211 F0004 Thanks thunderkid
  3. thunderkid

    Summing Column Data

    futurelet, your solution worked. vgersh99, as for my comment on "col1 fields may be repeated", here is further explanation. In those cases where column 1 repeats a value, I wanted to make a new calculation for each occurence. In my example, alpha is repeated, so two calculations I wanted two...
  4. thunderkid

    Summing Column Data

    Thanks PH. Just what I needed. You get a star. thunderkid
  5. thunderkid

    Summing Column Data

    I am trying to sums up col2 data in following data file # ----- data.txt ------- alpha 2 alpha 3 beta 4 beta 6 beta 10 gamma 1 alpha 4 alpha 10 desired results Col1 sums alpha 9 beta 10 gamma 1 alpha 14 Note that col1 fields may be repeated, but I want to make new calculation when they...
  6. thunderkid

    Workaround for IF Worksheet Function

    jdhilljr, Your solution was right onthe mark. Thanks. have a star! thunderkid
  7. thunderkid

    Workaround for IF Worksheet Function

    I am running into limitations with IF worksheet function--allows seven nested IF statement. I have budget worksheet and I want the balance to be read based on month of year. Here is an example: B2...
  8. thunderkid

    Selecting Records and Averaging Fields

    Perfect futurelet! Thanks a million. Have a star! thunderkid
  9. thunderkid

    Selecting Records and Averaging Fields

    Need help! I am trying to calculate the average for the 5th column values for records when value in third column changes. A sample of data is given below. thanks thunderkid data ----- short 2 1 3 2 0 short 2 1 3 2 0 short 2 1 3 2 0 short 2 1 3 2 0 short 2 1 3 2 0 short 2 1 3 2 0 short...
  10. thunderkid

    Using Cut Command To Split File

    I have solved my problem using awk. Thanks thunderkid
  11. thunderkid

    Using Cut Command To Split File

    I am trying to format inputs from several processed files. I want to use cut command. Current: File1col1 File1col2 File1col3 File1col4 I have tried: cut -f1,2 File1.dat > firstsec.dat cut -f3,4 File1.dat > thirdfourth.dat The files have space as a delimiters. As I have use Cut it is not...
  12. thunderkid

    Calculating Totals

    vgersh99 & PHV Thanks for your solutions. PHV, that was a nice touch for the sort on the output data. Both deserve a star! thunderkid
  13. thunderkid

    Calculating Totals

    I need to calculate the total for last two columns and print values in summary table. Sounds simple? I have tried modifying other scripts and searching the forum, but just don't get it. Below is sample data: 1 redx 55 1 redy 47 2 redx 23 2 redy 42 3 redx 50 3 redy 51 . . . 30 redx 30 30 redy...
  14. thunderkid

    Calculations Involving Two Rows

    mikevh Double thanks for solution and follow-up explanation. Have a star! thunderkid
  15. thunderkid

    Summarizing Data in Columns

    futuerlet Once again you came through with a gem! There is much to be learned from you and others. Thanks. Have a star! thunderkid

Part and Inventory Search

Back
Top