I have a text file which has the following data. There can be more lines in the file. But, I am only interested in these two lines which has ~ZZ~VISTN and ~ZZ~F159B segments.
The solution you have provided in your post did not really work.
When I run the command it is returning lots of rows with passed and failed, when there are two rows with ~ZZ~, the data I am interested in.
If I want to grep the value of third column and store it in some variable, How I can achieve that. As I said, when I tried cut it did not gave me the desired results.
And I am interested in every first line which starts with ISA, what I am trying to do is to get the value of third field which is ~ZZ~F159B and ~ZZ~VISTN, If it is ~ZZ~VISTN then it is PASS and if it is ~ZZ~F159B then it is fail.
I tried the cut command also which you send and that also did not work for me. I believe that I am doing something wrong.