Issue
I have a plain Mail and i need to remove everything before Summary of client activity for the last 24 hours
i thought it would work best with sed.
I searched the internet but there it's just with a delimiter or something similar.
You have any ideas?
Part of the Mail:
...(Personal Part of the Email)...
...
The following clients have no associated schedule
NodeDomainContact
-KABA-FILESYSTEM-
-USTICA-FILESYSTEM-
Summary of client activity for the last 24 hours
DomainNodenamePlatformTypeActivityData amountElapse timeAffectedFailedMedia wait
-FILESYSTEM-ABSYNTHE-Linux x86-64-XFS-
BACKUP-
337.5 MB-
00:00-
60-
0-
0
...
Desired Output:
Summary of client activity for the last 24 hours
DomainNodenamePlatformTypeActivityData amountElapse timeAffectedFailedMedia wait
-FILESYSTEM-ABSYNTHE-Linux x86-64-XFS-
BACKUP-
337.5 MB-
00:00-
60-
0-
0
...
Solution
Using awk:
awk '/Summary of client activity for the last 24 hours/{p=1}p' file
Or sed:
sed -n '/Summary of client activity for the last 24 hours/,$p' file
Test with your email example with awk (sed cmd above has same output):
kent$ cat f
...(Personal Part of the Email)...
...
The following clients have no associated schedule
NodeDomainContact
-KABA-FILESYSTEM-
-USTICA-FILESYSTEM-
Summary of client activity for the last 24 hours
DomainNodenamePlatformTypeActivityData amountElapse timeAffectedFailedMedia wait
-FILESYSTEM-ABSYNTHE-Linux x86-64-XFS-
BACKUP-
337.5 MB-
00:00-
60-
0-
0
...
kent$ awk '/Summary of client activity for the last 24 hours/{p=1}p' f
Summary of client activity for the last 24 hours
DomainNodenamePlatformTypeActivityData amountElapse timeAffectedFailedMedia wait
-FILESYSTEM-ABSYNTHE-Linux x86-64-XFS-
BACKUP-
337.5 MB-
00:00-
60-
0-
0
..
Answered By - Kent Answer Checked By - Timothy Miller (WPSolving Admin)