Timeline for How to extract XML data from logs using Unix shell script? [duplicate]
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 15, 2018 at 2:25 | history | edited | abhishek chaudhry | CC BY-SA 3.0 | added 64 characters in body |
| Jan 15, 2018 at 2:19 | comment | added | abhishek chaudhry | Thanks for reopenig the question. I have now given more details how the log looks like. The logs and data is on mutiple lines. The data which must be extracted is from <xml version > and ending at </Alert> tag. | |
| Jan 15, 2018 at 2:18 | history | edited | abhishek chaudhry | CC BY-SA 3.0 | added 595 characters in body |
| Jan 14, 2018 at 20:25 | comment | added | Chris Davies | I've hesitantly voted to re-open. Please would you provide a decent example consisting of several of the log file entries from which you want the XML data to be extracted. The relevant parts are any preamble, the first two or three elements of the XML document, and the corresponding end. Please make it absolutely clear whether each log file entry is on a single line, or multiple lines. If a log entry covers multiple lines please explain (in words) what starts and ends a log entry. | |
| Jan 14, 2018 at 20:05 | review | Reopen votes | |||
| Jan 14, 2018 at 21:10 | |||||
| Jan 14, 2018 at 19:48 | history | edited | abhishek chaudhry | CC BY-SA 3.0 | My question is different to the solution which is pointed out. |
| Jan 13, 2018 at 9:11 | history | closed | CommunityBot thrig mdpc Rui F Ribeiro jimmij | Duplicate of Parse XML to get node value in bash script? | |
| Jan 13, 2018 at 5:31 | comment | added | Fox | No, really, use a real XML parser. Using awk (which matches regular expressions) is not going to be useful in extracting data from XML (which is context free). If you don't know those terms, it means that you cannot correctly parse XML with regular expressions. | |
| Jan 12, 2018 at 21:02 | answer | added | LSerni | timeline score: 0 | |
| Jan 12, 2018 at 20:13 | review | Close votes | |||
| Jan 13, 2018 at 9:11 | |||||
| Jan 12, 2018 at 19:49 | comment | added | abhishek chaudhry | Any other way to do it? | |
| Jan 12, 2018 at 19:47 | comment | added | Michael Homer | Use a real XML parser. | |
| Jan 12, 2018 at 19:46 | history | edited | Michael Homer | CC BY-SA 3.0 | added 42 characters in body |
| Jan 12, 2018 at 19:45 | review | First posts | |||
| Jan 12, 2018 at 19:52 | |||||
| Jan 12, 2018 at 19:45 | history | asked | abhishek chaudhry | CC BY-SA 3.0 |