Find the answer to your Linux question:
Results 1 to 2 of 2
Hi I was just given an assignment to read a file with lines like this: 21126.43870 HEART_PARAMETER_CHANGE_EVENT ParamID:111 ParamVal:59(0x3B) 21126.44470 HEART_BEAT_EVENT CH:RV Cause:Conducted LT:857 WFIndex:7 PPAMP:100 21126.44670 HEART_PARAMETER_CHANGE_EVENT ParamID:112 ParamVal:59(0x3B) ...
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    3

    Post Script to read file and locate specific lines and do some math with the numbers.

    Hi

    I was just given an assignment to read a file with lines like this:

    21126.43870 HEART_PARAMETER_CHANGE_EVENT ParamID:111 ParamVal:59(0x3B)
    21126.44470 HEART_BEAT_EVENT CH:RV Cause:Conducted LT:857 WFIndex:7 PPAMP:100
    21126.44670 HEART_PARAMETER_CHANGE_EVENT ParamID:112 ParamVal:59(0x3B)
    HEART_SCENARIO_STRING_DISPLAY Strlen:31 String:4.5.7.1 TC1.0: AV SEARCH FEATUR
    21127.31369 HEART_BEAT_EVENT CH:RA Cause:Normal LT:869 WFIndex:7 PPAMP:100
    21127.41469 HEART_BEAT_EVENT CH:RV Cause:Conducted LT:970 WFIndex:7 PPAMP:100

    What I need to do is to find the lines with RA in followed by RV and subtract the value of LT on the RV line from the value of LT on the RA line and write the value to another text file.

    I know that someone in this forum has the ready know how and could save me tones of time.

    Thanks

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,096
    Sorry, but it's against the forum rules to post homework questions here:

    http://www.linuxforums.org/forum/lin...ums-rules.html

    You'll need to complete your own assignment.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...