Hey guys, my first post here.
I'm trying to use awk to copy all matching paragraphs from one file
The file looks like this :
Test Case Number 990990003099
Card Type CCCC
Transaction Type Sale
Entry Mode Keyed
Account Number 4099562299219923
Transaction Amount 78.88
Description lorem ipsum lorem ipsum
AVS Billing Postal Code 99999
Response Code 999
AVS Result Code A
Test Case Number 000990003099
Card Type CCCC
Transaction Type Sale
Entry Mode Keyed
Account Number 4909969931992993
Transaction Amount 78.90
Description lorem ipsum lorem ipsum
AVS Billing Postal Code 99999
Response Code 999
AVS Result Code Z
I need to copy from the line that says "Test Case" to another "Test case" if the "Transaction Type" equals a certain word, ether, "Sale", "Refund" or other type that I set.
The data set is spread across 2 columns and 10-12 rows.
Is it possible to copy with awk? If yes, then ... how?
Thank you, your help is greatly appreciated.
I'm trying to use awk to copy all matching paragraphs from one file
The file looks like this :
Test Case Number 990990003099
Card Type CCCC
Transaction Type Sale
Entry Mode Keyed
Account Number 4099562299219923
Transaction Amount 78.88
Description lorem ipsum lorem ipsum
AVS Billing Postal Code 99999
Response Code 999
AVS Result Code A
Test Case Number 000990003099
Card Type CCCC
Transaction Type Sale
Entry Mode Keyed
Account Number 4909969931992993
Transaction Amount 78.90
Description lorem ipsum lorem ipsum
AVS Billing Postal Code 99999
Response Code 999
AVS Result Code Z
I need to copy from the line that says "Test Case" to another "Test case" if the "Transaction Type" equals a certain word, ether, "Sale", "Refund" or other type that I set.
The data set is spread across 2 columns and 10-12 rows.
Is it possible to copy with awk? If yes, then ... how?
Thank you, your help is greatly appreciated.