Hi,
I have four files named:
AS1.txt
AS2.txt
AS3.txt
AS4.txt
The files contain the following text:
Example:
AS_CLI/ASDiagnostic/Diag> 7 phone 0773008619
AS_CLI/ASDiagnostic/Diag> 7 phone 033008775
AS_CLI/ASDiagnostic/Diag> 7 phone 087300936
AS_CLI/ASDiagnostic/Diag> 7 phone 0773009111
AS_CLI/ASDiagnostic/Diag> 7 phone 0773009701
Status = FAILED
AS_CLI/ASDiagnostic/Diag> 7 phone 0773011572
AS_CLI/ASDiagnostic/Diag> 7 phone 0773012844
AS_CLI/ASDiagnostic/Diag> 7 phone 0773077029
AS_CLI/ASDiagnostic/Diag> 7 phone 0773088133
AS_CLI/ASDiagnostic/Diag> 7 phone 0773088195
AS_CLI/ASDiagnostic/Diag> 7 phone 0773088317
AS_CLI/ASDiagnostic/Diag> 7 phone 0773088539
I need to get the status, number (the line above the status) and the file that it came from in one line in one file.
I whole like to have one file that look like this:
0773009701 Status = FAILED AS1.txt
033009702 Status = FAILED AS2.txt
074309703 Status = FAILED AS3.txt
0723047012 Status = FAILED AS1.txt
Thanks in advance.
erezz
0
Newbie Poster
Recommended Answers
Jump to PostHi erezz,
The program below will give you the output you want.
Please note that this program will be in the same directory with your text files or you might have to specify the path to these files yourself from the program. The result is saved to a file called …
All 2 Replies
2teez
43
Posting Whiz
erezz
commented:
2 teez, Thank you very much for the quick response and for your help.
+0
erezz
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.