Actual logs are:2016-06-19 22:08:09 [213917] 1bEgCe-000tZR-E9 ** saadia@aol.com (fahad@manakintextiles.com) <fahad@manakintextiles.com> F=<james@designplus.com> P=<james@designplus.com> R=lookuphost T=remote_smtp H=mailin-01.mx.aol.com [64.12.88.131]:25 I=[36.23.21.11]:60147: SMTP error from remote mail server after initial connection: 554- (RTR:BL)  https://postmaster.aol.com/error-codes#554rtrbl\n554  Connecting IP: 36.23.21.112016-06-20 01:03:22 [516458] 1bEiwD-001zt7-IY ** saadia@aol.com (ranasohail@makintextiles.com) <ranasohail@makintextiles.com> F=<james@kansaifelt.com> P=<james@kansaifelt.com> R=lookuphost T=remote_smtp H=mailin-02.mx.aol.com [64.12.88.163]:25 I=[36.23.21.14]:47630: SMTP error from remote mail server after initial connection: 554- (RTR:BL)  https://postmaster.aol.com/error-codes#554rtrbl\n554  Connecting IP: 36.23.21.142016-06-20 09:29:46 [256975] 1bEqpT-0014jI-HV ** otck@aol.com F=<info@alhadeed.com> P=<info@alhadeed.com> R=dkim_lookuphost T=dkim_remote_smtp H=mailin-04.mx.aol.com [64.12.88.132]:25 I=[36.23.21.11]:43705: SMTP error from remote mail server after initial connection: 421 DYN:T2  https://postmaster.aol.com/error-codes#554rtrbl\n554  Connecting IP: 36.23.21.112016-06-20 11:41:34 [413114] 1bEstm-001jSC-Ic ** awaq313@aol.com F=<anno@tekstilworks.co.uk> P=<anno@tekstilworks.co.uk> R=dkim_lookuphost T=dkim_remote_smtp H=mailin-02.mx.aol.com [64.12.91.195]:25 I=[36.23.21.14]:48714: SMTP error from remote mail server after initial connection: 421 DYN:T1  https://postmaster.aol.com/error-codes#554rtrbl\n554  Connecting IP: 36.23.21.14What i want to get:Timestamp       EmailTo:        EmailFrom:               IPAddress:      ErrorCodes:2016-06-19      saadia@aol.com  james@designplus.com     36.23.21.11     554- (RTR:BL)2016-06-20      saadia@aol.com  james@kansaifelt.com     36.23.21.14     554- (RTR:BL)2016-06-20      otck@aol.com    info@alhadeed.com        36.23.21.11     421 DYN:T22016-06-20      awaq313@aol.com anno@tekstilworks.co.uk  36.23.21.14     421 DYN:T1I have extract first three fields from following command: echo -e Timestamp\t\tEmailTo:\t\tEmailFrom:\t\t\t\t\t\t\t\tIPAddress:\tErrorCodes: && awk 'NF>6 { d=6 ; while ( ! ($d ~ /^F=/ ) ) d++ ; printf %s\t%s\t%s\n,$1,$6,substr($d,4,length($d)-4) ;} ' logs | column -tThanks to all but i have done it thru: echo -e Timestamp:\tEmailTo:\tEmailFrom:\t\tIPAddress:\tErrorCodes: && awk 'NF>6 { d=6 ; while ( ! ($d ~ /^F=/ ) ) d++ ; print %s\t%s\t%s\t%s\t%s\t%s\n,$1,$6,substr($d,4,length($d)-4),$NF,$(NF-5)$(NF-4) ; }' oops | column -t| grep -v %s
Extracting from Logs
bash;shell script;text processing