Hi Guys,
I think this is simple, but I need some one nail it for me.
I got the input data like this pattern
The data sometimes contain error sometimes not, I just want to grab the data under -Value,
Here's the code I've tried
Above code doesn't work, Any idea how to nail it. The problem is how to stop when it gets the bottom of the line.
Thanks guys
I think this is simple, but I need some one nail it for me.
I got the input data like this pattern
Code:
-File
...
...
-Value
...
...
-Error --> # this row is optional
....
The data sometimes contain error sometimes not, I just want to grab the data under -Value,
Here's the code I've tried
Code:
script_that_produce_the_data_above |
awk '/^\-Value/{
getline
while ($0 !~ /^\-Error/) || ($0 != "")
{print;getline}
}'
Above code doesn't work, Any idea how to nail it. The problem is how to stop when it gets the bottom of the line.
Thanks guys