Re: Regex To get the Job Number and Corresponding state

[email protected] (Asad)
Newsgroups perl.beginners
Message-ID <CAG3LsKFsoc_DJBDdepVo2fF9s_dB4YhgfYx5Myanh=6GhzheDQ@mail.gmail.com>
The problem with grep is that line numbers may change so even if i do grep
-E   SUCCEEDED|"\ "ZDM_SETUP_TGT\"" -B5 , it may not alway 5 line above or
is there a more better way in grep or regex


On Tue, Feb 25, 2025 at 10:22 PM Erick Paquin <[email protected]> wrote:

> You can use grep for this..
>
> ---
> Erick Paquin
>
> On 25/02/2025 11:49 am, Asad wrote:
> > Hi All,
> >
> > I have a requirement to use regex  , find the Job ID for the Current
> > status: SUCCEEDED and Current Phase: "ZDM_SETUP_TGT" from a file
> > which has data in the format gives below :
> >
> > Job ID: 52
> > User: zdmuser
> > Client: zdmhost
> > Job Type: "EVAL"
> > ...
> > Current status: SUCCEEDED
> > Current Phase: "ZDM_SETUP_TGT"
> >
> > Thanks,
>


-- 
Asad Hasan
+91 9582111698
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.