maddog21
June 19th, 2012, 10:48 AM
I am trying to get some data from a file and print it on the same line.
I have a script that gets the body of emails and display it, but i want it to display each emails body in one line no matter how big it is. eg
insted of this
email1: bla bla bla
bla bla bla
bal
email2: bla bla bla bal
bla bla bal
i want it to print
email1: bla bla bal bal bal bal
email2: bla bal bla blalba bla bla
the code i used to print the body is awk '/Content-Type/{p=1;c++;print "Email-",c;}/Date/{p=0}p' file
Thank You!
I have a script that gets the body of emails and display it, but i want it to display each emails body in one line no matter how big it is. eg
insted of this
email1: bla bla bla
bla bla bla
bal
email2: bla bla bla bal
bla bla bal
i want it to print
email1: bla bla bal bal bal bal
email2: bla bal bla blalba bla bla
the code i used to print the body is awk '/Content-Type/{p=1;c++;print "Email-",c;}/Date/{p=0}p' file
Thank You!