Skip to content

Commit 5f671e4

Browse files
internal changes to paragrep
1 parent 1cd09f8 commit 5f671e4

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ Later I decided to implement it as the standalone script adding more functionali
6969
Each log entry in log files usually begins with the timestamp in the generalized numeric form *date time*, which can be covered by the pattern without reflecting on which date format has been used to output dates:
7070

7171
```bash
72-
paragrep -Pp '^\d+/\d+/\d+ \d+:\d+:\d+' PATTERN FILENAME
72+
paragrep -Pp '^\d+[/-]\d+[/-]\d+ \d+:\d+:\d+' PATTERN FILENAME
7373
```
7474

7575
Also the aliases for parsing log files and INI-like configuration files:
7676

7777
```bash
78-
alias lgrep="paragrep -Pp '^\d+/\d+/\d+ \d+:\d+:\d+'"
78+
alias lgrep="paragrep -Pp '^\d+[/-]\d+[/-]\d+ \d+:\d+:\d+'"
7979
alias cgrep="paragrep -Pp '^(#@ |#-> )?\['"
8080
```
8181

TODO

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# paragrep
2+
3+
Output control
4+
5+
--color={never|always|auto}
6+
7+
Context control
8+
9+
-B, --before-context=NUMBER
10+
-A, --after-context=NUMBER
11+
-C, --context=NUMBER

perl/paragrep

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ The following example demonstrates the customized paragraph definition
133133
for parsing log files. Usually, applications producing log files write
134134
one log entry per one line. Somethimes applications (especially written
135135
in Java) produce multiline log entries. Each log entry begins with the
136-
timestamp in the generalized form C<date time>, which can be covered by
137-
the pattern C<\d+/\d+/\d+ \d+:\d+:\d+> without reflecting on which date
138-
format has been used to output dates:
136+
timestamp in the generalized form C<date time>, which can be covered
137+
by the pattern C<^\d+[/-]\d+[/-]\d+ \d+:\d+:\d+> without reflecting on
138+
which date format has been used to output dates:
139139

140-
paragrep -Pp '^\d+/\d+/\d+ \d+:\d+:\d+' PATTERN FILENAME
140+
paragrep -Pp '^\d+[/-]\d+[/-]\d+ \d+:\d+:\d+' PATTERN FILENAME
141141

142142
=head2 Example
143143

@@ -180,7 +180,7 @@ perlre(1)
180180

181181
=head1 COPYRIGHT
182182

183-
Copyright 2017-2021, Ildar Shaimordanov
183+
Copyright 2017-2022, Ildar Shaimordanov
184184

185185
MIT License
186186

0 commit comments

Comments
 (0)