Last active
July 1, 2020 20:12
-
-
Save pniederlag/0848554e32ad664e037d35d857cb968d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rebuild started | |
01.06.2018 05:21:32 | |
1593581ueuie | |
erunireaundenr | |
rnudnenuden | |
rebuild finished | |
15935udanedue | |
01.06.2018 06:01:09 | |
rebuild started | |
02.06.2018 09:14:34 | |
15uieuieuieuie | |
rebuild failed | |
uedurnaerdt | |
ruertudren | |
duriaetie | |
.... | |
rebuild finished | |
irdonidonirn | |
02.06.2020 09:25:31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/rebuild started/ {getline startdate;statusline=" OK "} | |
/rebuild failed/ {statusline=" FAILED "} | |
/rebuild finished/ {getline ignore; getline enddate; sub("([0-9]{2}\\.[0-9]{2}\\.[0-9]{4} )", "", enddate);print startdate " bis " enddate " : " statusline " "} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -f example-variables.awk example-stream.log | |
01.06.2018 05:21:32 bis 06:01:09 : OK | |
02.06.2018 09:14:34 bis 09:25:31 : FAILED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ease of use of awk compared to sed.