What I want is from the first occurrence of the delimiter to the last occurrence of the same delimiter,including everything between them,the delimiter may appear multi-times in a log file.
sample.log
[T=iaaaaaaaaa134]:SampleClass9:
[T=iaaaaaaaaa134]:SampleClass7:
[T=iaaaaaaaaa134]:SampleClass3:
[T=iaaaaaaaaa134]:SampleClass1:
[T=i8732jddcd234]:SampleClass1:
[T=i8732jddcd234]:SampleClass2:
[T=i8732jddcd234]:SampleClass3:
[T=i8732jddcd234]:SampleClass4:
Exception:NullPointerException:
sampte 1
sampte 1
sampte 1
sampte 1
sampte 1
[T=i8732jddcd234]:SampleClass00:
[T=i8732jddcd234]:SampleClass00:
[T=i8732jddcd234]:SampleClass00:
[T=i8732jddcd234]:SampleClass00:
[T=i8732jddcd234]:SampleClass00:
Exception:NullPointerException2:
sampte 2
sampte 2
sampte 2
sampte 2
sampte 2
[T=i8732jddcd234]:SampleClass12:
[T=i8732jddcd234]:SampleClass32:
[T=i8732jddcd234]:SampleClass22:
[T=2eeeeeeeee234]:SampleClass32:
[T=2eeeeeeeee234]:SampleClass82:
[T=2eeeeeeeee234]:SampleClass22:
[T=2eeeeeeeee234]:SampleClass22:
for example: I want to extract the lines starting from the first occurrence of i8732jddcd234 (the delimiter) to the latest occurrence of i8732jddcd234 and everything between them. possibly with awk, sed, grep linux command.because this is a log file on linux server. I tried with
awk /'i8732jddcd234','i8732jddcd234'/ test.log
of course, it won't work