GilmarACN
Programmer
- Jan 10, 2014
- 3
- 0
- 0
Hello, I am new to AWK and I was wondering if I can use AWK for this:
I have to generate multiple files for a performance testing task where only the filename and a string within the file would be incremented for each test file. We need to generate thousands of files which is why we are looking for an automated solution. Can I create a "master" file for this and have AWK use this file to generate all my test files? Here's what I'm thinking:
Master File contains:
1. filename = WAWF_I_002-TEST-XXXX.xml (where XXXX will be incremented for each file)
2. include a variable within the data to increment my invoice number to correspond to the filename (<Invoice_Document.Invoice_Identification.Identifier>6U02130228-XXXX</Invoice_Document.Invoice_Identification.Identifier>)
3. all remaining data to be included on each file as noted except for the invoice number (possibly surrounded by {} or any other special character to indicate the beginning and ending of the data block)
Any thoughts on this? Will this be a good approach to take? Your help with this will be greatly appreciated.
Thanks,
Gilmar
I have to generate multiple files for a performance testing task where only the filename and a string within the file would be incremented for each test file. We need to generate thousands of files which is why we are looking for an automated solution. Can I create a "master" file for this and have AWK use this file to generate all my test files? Here's what I'm thinking:
Master File contains:
1. filename = WAWF_I_002-TEST-XXXX.xml (where XXXX will be incremented for each file)
2. include a variable within the data to increment my invoice number to correspond to the filename (<Invoice_Document.Invoice_Identification.Identifier>6U02130228-XXXX</Invoice_Document.Invoice_Identification.Identifier>)
3. all remaining data to be included on each file as noted except for the invoice number (possibly surrounded by {} or any other special character to indicate the beginning and ending of the data block)
Any thoughts on this? Will this be a good approach to take? Your help with this will be greatly appreciated.
Thanks,
Gilmar