OT: sed/awk help

Mike Wright nobody at nospam.hostisimo.com
Sat Jan 30 03:07:04 UTC 2016


Hi all,

Don't know whether this requires a "sed" and/or an "awk" solution.  I 
have strings in a log file whose only important info for a digest are 
new strings containing the date, time, and the remainder of the line 
following the first occurrence of a hyphen.  All delimiters are spaces 
until the first hyhpen (there may be multiple hyphens but I only care 
about the first).

Here is what the original line looks like:

date time txt1 txt2 txt3: txt4 txt5 txt6 txt7 domain-email

Here is what I'm looking for:

date time partFollowingHyphen1

Way beyond my sedawk-foo.

Any takers?

Thanks in advance,
Mike Wright



More information about the users mailing list