Find the answer to your Linux question:
Results 1 to 3 of 3
I have a file which provide the output of all the applications which started and running successfully. But it doesn't give the Error message of the applications which are failed. ...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    10

    Searching and comparing string

    I have a file which provide the output of all the applications which started and running successfully. But it doesn't give the Error message of the applications which are failed.

    For example there are 5 applications (ABC,DEF,NMO,STO,XYZ) and application STO failed so I will get the following output (out.txt).


    content of out.txt file

    Application ABC is Running
    Application DEF is Running
    Application NMO is Running
    Application XYZ is Running


    I want to generate the text message based on the information on out.txt that STO application is Failed.

    Please help me how can I generate under linux.

    Thanks
    -Naveed-

  2. #2
    Just Joined!
    Join Date
    May 2010
    Posts
    5
    how does the application work? I have a few ideas but no actual programming code to help you out.

    If the results of the program (as outputted on out.txt) is based on whether it sees a process running, then I would think that additional logic would have to be designed into the program to help it figure out whether the lack of a process running is due to the target program failing shortly after starting or not having started at all. If that's the case, then the target application will have to be modified to log SOMEWHERE that it tried to start. You can then have the custom application read the log, and from there determine it failed (because it started but isn't actually running anymore) or never started.

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Please do not post the same thread in multiple forums.
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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