cancel
Showing results for 
Search instead for 
Did you mean: 

Uniqe problem with mailx

pareshan
Regular Advisor

Uniqe problem with mailx

I am attaching one file from mailx and sending to some users but I am getting weird problem.

some of thelines of the text file is getting wrapped together but not all.

my script is like this

email_list="grc@hotmail.com, funny_g@gmail.com, crazy_me@yahoo.com"
mailx -s "Lic Info(Prod)" $email_list < $work_path/result

Note: The result under work path is already defined

and my mail contains some of the lines wrapped together like this

here is the mail which has wrapped line in between for few lines

----------

The servers expired already or will expire within 7 days


06/16/2009 bhptlga4 temporary Logical Processors in System: 24
06/16/2009 bhptlga6 temporary Logical Processors in System: 24
06/16/2009 bhptnk2 temporary Logical Processors in System: 32
06/16/2009 bhptws01 temporary Logical Processors in System: 16
06/16/2009 dhpnca2a temporary Logical Processors in System: 48
06/16/2009 dhptg46b temporary Logical Processors in System: 16

The servers will expire after 30th day

08/31/2009 astro permanent Logical Processors in System: 64
08/31/2009 dhpmafg1 permanent Logical Processors in System: 64
08/31/2009 dhpnws2 permanent Logical Processors in System: 32
08/31/2009 dhptlg35 permanent Logical Processors in System: 16
08/31/2009 dhptlg36 permanent Logical Processors in System: 16
08/31/2009 dhptlg37 permanent Logical Processors in System: 16
08/31/2009 dhptlg38 permanent Logical Processors in System: 16
08/31/2009 dhptlg39 permanent Logical Processors in System: 16
08/31/2009 dhptlg40 permanent Logical Processors in System: 16
08/31/2009 dhptlg41 permanent Logical Processors in System: 16 06/01/2010 dhptlg28 permanent Logical Processors in System: 16 07/01/2010 dhpalh2 permanent Logical Processors in System: 16 07/01/2010 dhpmafg2 permanent Logical Processors in System: 64 07/01/2010 thaspen permanent Logical Processors in System: 16 08/02/2010 dhpalh1 permanent Logical Processors in System: 16 08/02/2010 dhpmafg4 permanent Logical Processors in System: 48 08/02/2010 frodo permanent Logical Processors in System: 32 08/02/2010 groucho permanent Logical Processors in System: 32 08/02/2010 moe permanent Logical Processors in System: 24 08/02/2010 rubble permanent Logical Processors in System: 32 10/13/2010 dhptlg27 permanent Logical Processors in System: 32 10/13/2010 dhptlga1 permanent Logical Processors in System: 16 10/13/2010 dhptlga2 permanent Logical Processors in System: 16 10/13/2010 dhptlga3 permanent Logical Processors in System: 16 12/14/2010 bhpmafg7 permanent Logical Processors in System: 72
03/14/2011 bhptlga5 permanent Logical Processors in System: 16
03/14/2011 dhpdls2b permanent Logical Processors in System: 32
03/29/2011 bhpbob10 permanent Logical Processors in System: 16
03/29/2011 bhpbobs9 permanent Logical Processors in System: 48
03/29/2011 bhptlga7 permanent Logical Processors in System: 24
03/29/2011 bhptlga8 permanent Logical Processors in System: 16
08/15/2011 benji permanent Logical Processors in System: 64
08/15/2011 crockett permanent Logical Processors in System: 24
08/15/2011 dhpnca2b permanent Logical Processors in System: 48
08/15/2011 manhattn permanent Logical Processors in System: 24
08/29/2011 dhpbob4b permanent Logical Processors in System: 64
08/29/2011 dhppac2c permanent Logical Processors in System: 64
08/30/2011 bowie permanent Logical Processors in System: 32
08/30/2011 dhpbobs7 permanent Logical Processors in System: 32
08/30/2011 dhpmaf17 permanent Logical Processors in System: 48
08/30/2011 dhptlg14 permanent Logical Processors in System: 16
08/30/2011 dhptlg25 permanent Logical Processors in System: 16
08/30/2011 dhptlg26 permanent Logical Processors in System: 16
08/30/2011 ferguson permanent Logical Processors in System: 16
08/30/2011 larry permanent Logical Processors in System: 32
08/30/2011 pecos permanent Logical Processors in System: 24
08/30/2011 thbirch permanent Logical Processors in System: 16
08/30/2011 thpbobs1 permanent Logical Processors in System: 48
08/30/2011 thpbobs2 permanent Logical Processors in System: 48
08/30/2011 thpbobs3 permanent Logical Processors in System: 48
08/30/2011 thpbobs4 permanent Logical Processors in System: 64
10/19/2011 dhpmtz2 permanent Logical Processors in System: 32
10/19/2011 superior permanent Logical Processors in System: 16
04/02/2012 dhpbos2 permanent Logical Processors in System: 30
04/02/2012 slate permanent Logical Processors in System: 32
04/30/2012 uhpbobs5 permanent Logical Processors in System: 40
04/30/2012 uhpglr2 permanent Logical Processors in System: 32
04/30/2012 uhpill2 permanent Logical Processors in System: 24
04/30/2012 uhpmafg5 permanent Logical Processors in System: 64
04/30/2012 uhprtg4 permanent Logical Processors in System: 16
04/30/2012 uhprtg5 permanent Logical Processors in System: 16
04/30/2012 uhprtg6 permanent Logical Processors in System: 16
04/30/2012 uhptlg16 permanent Logical Processors in System: 16
04/30/2012 uhptlg17 permanent Logical Processors in System: 16
04/30/2012 uhptlg18 permanent Logical Processors in System: 16
04/30/2012 uhptlg19 permanent Logical Processors in System: 16
04/30/2012 uhptlg20 permanent Logical Processors in System: 16
04/30/2012 uhptlg21 permanent Logical Processors in System: 16
04/30/2012 uhptlg22 permanent Logical Processors in System: 16
04/30/2012 uhptlg23 permanent Logical Processors in System: 16
04/30/2012 uhptlg24 permanent Logical Processors in System: 16
10/30/2012 dhpbobs6 permanent Logical Processors in System: 16
10/30/2012 dhpmafg6 permanent Logical Processors in System: 64
10/30/2012 dhptg45a permanent Logical Processors in System: 16
10/30/2012 dhptg45b permanent Logical Processors in System: 16
10/30/2012 dhptg46a permanent Logical Processors in System: 16
10/30/2012 dhptg47a permanent Logical Processors in System: 16
10/30/2012 dhptg47b permanent Logical Processors in System: 16
10/30/2012 dhptg48a permanent Logical Processors in System: 16
10/30/2012 dhptg48b permanent Logical Processors in System: 16
10/30/2012 dhptlg29 permanent Logical Processors in System: 16
10/30/2012 dhptlg31 permanent Logical Processors in System: 16
10/30/2012 dhptlg32 permanent Logical Processors in System: 16
10/30/2012 dhptlg33 permanent Logical Processors in System: 16
10/30/2012 dhptlg34 permanent Logical Processors in System: 16
10/30/2012 dhptlg42 permanent Logical Processors in System: 16
10/30/2012 dhptlg43 permanent Logical Processors in System: 16
10/30/2012 dhptlg44 permanent Logical Processors in System: 16
10/30/2012 thzappa permanent Logical Processors in System: 64
10/31/2012 rintin10 permanent Logical Processors in System: 64
05/30/2013 bhpbob19 permanent Logical Processors in System: 56
05/30/2013 bhpmaf13 permanent Logical Processors in System: 64
05/30/2013 bhprtg10 permanent Logical Processors in System: 32




wht could be wrong?
I will appreciate any help
Thanks
6 REPLIES
Mel Burslan
Honored Contributor

Re: Uniqe problem with mailx

using scp or ftp (in binary mode NOT ASCII) copy $work_path/result file to your PC workstation and see without the mailx in the picture, you see the same garbled text.

It seems like, whichever application is generating this file you are sendin, is not putting the characters on certain portion of the output.

you can also try this and see if it works:

mailx -s "Lic Info(Prod)" $email_list < $(usr/bin/ux2dos $work_path/result)

HTH
________________________________
UNIX because I majored in cryptology...
Dennis Handly
Acclaimed Contributor

Re: Uniqe problem with mailx

>my mail contains some of the lines wrapped together like this

Unless you add comments on each line saying what should or shouldn't be there, this output looks fine.

By wrapped, do you mean the lines should be very long? Could it be your mail client rather than mailx? How long are your lines?
pareshan
Regular Advisor

Re: Uniqe problem with mailx

No my lines are not long i think i have attached the samples before also.

my each line contains
8 words separated by space
for example
06/16/2009 bhpbob20 temporary Logical Processors in System: 32
06/16/2009 bhpbob21 temporary Logical Processors in System: 32
06/16/2009 bhpflp2 temporary Logical Processors in System: 56
06/16/2009 bhpflp4 temporary Logical Processors in System: 40


You are right as long as i dont say what to do in script it shouldn't change. But thats why I am wondering for no reason its giving me wrapped line in between ..and funny thing i found out is the dates like in that example which has only 2010 in year are getting wrapped together
plz see in the attached file

where all the lines are supposed to be in one line but some of them are getting wrapped in between and i dint see anything wrong wity my mailx command also. If its wrong also it should not be like that only for those few lines

Thanks
Need Help Seriously


Mel Burslan
Honored Contributor

Re: Uniqe problem with mailx

you need to show us the script that is used to create this file you attached. Looks like that one is creating the long line(s) and the reason for it might be one of the many. One comes to mind off the top of my head is a regex matching more than it can chew-up.

Without seeing how the mailed file gets created, it is next to impossible to make a reasonable suggestion
________________________________
UNIX because I majored in cryptology...
pareshan
Regular Advisor

Re: Uniqe problem with mailx

Thanks for all suggestion guys but I found out the solution and its really silly.

Its feature of the mail (my company mail) not the problem with any script when it has extra spaces it just wrappes it.

I was thinking and thinking and was sad because couldnt find the solution

thanks
pareshan
Regular Advisor

Re: Uniqe problem with mailx

Yeah it was feature of my mail (company mail)