Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22796

parse output and check if a change

X-Received by 10.224.18.132 with SMTP id w4mr5665qaa.1.1362683455324; Thu, 07 Mar 2013 11:10:55 -0800 (PST)
X-Received by 10.49.25.13 with SMTP id y13mr3007408qef.2.1362683455284; Thu, 07 Mar 2013 11:10:55 -0800 (PST)
Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!dd2no8065743qab.0!news-out.google.com!o5ni2qas.0!nntp.google.com!dd2no8065741qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Thu, 7 Mar 2013 11:10:55 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=83.251.141.67; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd
NNTP-Posting-Host 83.251.141.67
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <d8a65c18-bb59-42e8-85b9-8d47d4b21500@googlegroups.com> (permalink)
Subject parse output and check if a change
From mike <mikaelpetterson@hotmail.com>
Injection-Date Thu, 07 Mar 2013 19:10:55 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Received-Bytes 1848
Xref csiph.com comp.lang.java.programmer:22796

Show key headers only | View raw


Hi,

I am sending a command to unix and then I parse the output. The output is stored in a Info object ( Info.java). This will be used later in application. 

The problem is that the output from the unix command might change. So I want to make sure that if there is a change then we parse and update the Info object. But if there is no change then we do not need to parse and extract the information. We can use the Info object directly.

The idea I have is to use the output from the command ( a text string) and calculate some kind of hash/md5sum.

So the next time I run the unix command I take the output (a string) and calculate hash/md5 and see if it is an exact match as was generated the first time.

Anyone will to give a hint on how to implememt this using java?

br,

//mike

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

parse output and check if a change mike <mikaelpetterson@hotmail.com> - 2013-03-07 11:10 -0800
  Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-07 14:14 -0500
    Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-07 14:16 -0500
      Re: parse output and check if a change Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2013-03-08 19:16 -0800
        Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-08 22:29 -0500
    Re: parse output and check if a change Joerg Meier <joergmmeier@arcor.de> - 2013-03-07 23:50 +0100
      Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-07 19:13 -0500
  Re: parse output and check if a change Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-03-07 16:59 -0800
  Re: parse output and check if a change lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-08 08:54 +0000

csiph-web