Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mailx wrapping the lines itself

39 views
Skip to first unread message

#! /shell/nerd

unread,
Sep 22, 2008, 4:24:32 PM9/22/08
to
Hi,

Have a weird problem - I have a log file named - Log whose content are

01 [09/22/08 13:36:21] INF: MyScript.sh starts
02 [09/22/08 13:36:21] INF: fetching account details -
03 [09/22/08 13:36:21] INF: ENV#1
04 [09/22/08 13:36:21] INF: ENV#2
05 [09/22/08 13:36:22] INF: ENV#3
06 [09/22/08 13:36:24] INF: ENV#4
07 [09/22/08 13:36:26] INF: ENV#5
08 [09/22/08 13:36:27] INF: verifying ENV#1 Database : DATABASE01
09 [09/22/08 13:36:27] INF: locating DB Script - found. verifying
script content
10 [09/22/08 13:36:31] INF: verification successful for ENV#1
11 [09/22/08 13:36:32] INF: verifying ENV#2 Database : DATABASE04
12 [09/22/08 13:36:32] INF: locating DB Script - found. verifying
script content
13 [09/22/08 13:36:32] ERR: db script does not contain details for
ENV#2 instance DATABASE04
14 [09/22/08 13:36:33] INF: verifying ENV#3 Database : DATABASE03
15 [09/22/08 13:36:33] INF: locating DB Script - found. verifying
script content
16 [09/22/08 13:36:36] INF: verification successful for ENV#3
17 [09/22/08 13:36:37] INF: verifying ENV#4 Database : DATABASE05
18 [09/22/08 13:36:37] INF: locating DB Script - found. verifying
script content
19 [09/22/08 13:36:40] INF: verification successful for ENV#4
20 [09/22/08 13:36:41] INF: verifying ENV#5 Database : DATABASE06
21 [09/22/08 13:36:41] INF: locating DB Script - found. verifying
script content
22 [09/22/08 13:36:42] ERR: conflict found for
NAME='template_server_name' - Script value : 'https://hostname:port',
DB value : http://hostname:port
23 [09/22/08 13:36:46] INF: verification successful for ENV#5
24 [09/22/08 13:36:47] INF: MyScript.sh ends
25 [09/22/08 13:36:48] - x -

I'm trying to send this file to myself using mailx like below -

mailx -s "Log" my...@mydomain.com < Log

Now this's what I get as the mail content -

01 [09/22/08 13:36:21] INF: MyScript.sh starts
02 [09/22/08 13:36:21] INF: fetching account details -
03 [09/22/08 13:36:21] INF: ENV#1
04 [09/22/08 13:36:21] INF: ENV#2
05 [09/22/08 13:36:22] INF: ENV#3
06 [09/22/08 13:36:24] INF: ENV#4
07 [09/22/08 13:36:26] INF: ENV#5
08 [09/22/08 13:36:27] INF: verifying ENV#1 Database : DATABASE01
09 [09/22/08 13:36:27] INF: locating DB Script - found. verifying
script content 10 [09/22/08 13:36:31] INF: verification successful
for ENV#1
11 [09/22/08 13:36:32] INF: verifying ENV#2 Database : DATABASE04
12 [09/22/08 13:36:32] INF: locating DB Script - found. verifying
script content
13 [09/22/08 13:36:32] ERR: db script does not contain details for
ENV#2 instance DATABASE04
14 [09/22/08 13:36:33] INF: verifying ENV#3 Database : DATABASE03
15 [09/22/08 13:36:33] INF: locating DB Script - found. verifying
script content
16 [09/22/08 13:36:36] INF: verification successful for ENV#3
17 [09/22/08 13:36:37] INF: verifying ENV#4 Database : DATABASE05
18 [09/22/08 13:36:37] INF: locating DB Script - found. verifying
script content
19 [09/22/08 13:36:40] INF: verification successful for ENV#4 20
[09/22/08 13:36:41] INF: verifying ENV#5 Database : DATABASE06
21 [09/22/08 13:36:41] INF: locating DB Script - found. verifying
script content
22 [09/22/08 13:36:42] ERR: conflict found for
NAME='template_server_name' - Script value : 'https://hostname:port',
DB value : http://hostname:port
23 [09/22/08 13:36:46] INF: verification successful for ENV#5
24 [09/22/08 13:36:47] INF: MyScript.sh ends
25 [09/22/08 13:36:48] - x -

Notice line#10 & 20 are wrapped automatically. How !!
I checked the content of Log for any special character what so ever
but didn't find any.
I even tried mail command but same problem. FYI it's on HP-UX & mailx
version is "Revision: 1.179.214.2 PHNE_26303 Date: 98/12/01
01:29:55"
Could somebody help !!! (10x in Advance)

Gary Johnson

unread,
Sep 23, 2008, 1:13:16 AM9/23/08
to
#! /shell/nerd <vika...@gmail.com> wrote:
> Hi,
>
> Have a weird problem - I have a log file named - Log whose content are

[original lines deleted]

> I'm trying to send this file to myself using mailx like below -
>
> mailx -s "Log" my...@mydomain.com < Log
>
> Now this's what I get as the mail content -

[received, wrapped lines deleted]

> Notice line#10 & 20 are wrapped automatically. How !!
> I checked the content of Log for any special character what so ever
> but didn't find any.
> I even tried mail command but same problem. FYI it's on HP-UX & mailx
> version is "Revision: 1.179.214.2 PHNE_26303 Date: 98/12/01
> 01:29:55"
> Could somebody help !!! (10x in Advance)

I just tried this using mailx

Revision: 1.179.214.2 Date: 98/12/01 01:29:55

on an HP-UX 11.11 system with your Log file example. None of the lines
in the received message were wrapped. I used mutt 1.5.17 to read the
message.

You didn't say what you used to read the message. What makes you think
your mail reader is not the one wrapping the lines?

--
Gary Johnson

#! /shell/nerd

unread,
Sep 24, 2008, 11:20:49 AM9/24/08
to
On Sep 23, 12:13 am, Gary Johnson <garyj...@eskimo.com> wrote:

> #! /shell/nerd <vikas...@gmail.com> wrote:
> > Hi,
>
> > Have a weird problem - I have a log file named - Log whose content are
>
> [original lines deleted]
>
> > I'm trying to send this file to myself using mailx like below -
>
> > mailx -s "Log" m...@mydomain.com < Log

>
> > Now this's what I get as the mail content -
>
> [received, wrapped lines deleted]
>
> > Notice line#10 & 20 are wrapped automatically. How !!
> > I checked the content of Log for any special character what so ever
> > but didn't find any.
> > I even tried mail command but same problem. FYI it's on HP-UX & mailx
> > version is "Revision: 1.179.214.2 PHNE_26303 Date: 98/12/01
> > 01:29:55"
> > Could somebody help !!! (10x in Advance)
>
> I just tried this using mailx
>
> Revision: 1.179.214.2 Date: 98/12/01 01:29:55
>
> on an HP-UX 11.11 system with your Log file example. None of the lines
> in the received message were wrapped. I used mutt 1.5.17 to read the
> message.
>
> You didn't say what you used to read the message. What makes you think
> your mail reader is not the one wrapping the lines?
>
> --
> Gary Johnson

Thanks for the response Gary. I read it through Outlook 2007. I'm not
sure whether Outlook is the one wrapping the lines.
I realize that it was one of Outlook's "features(?)" which was doing
it, removing extra line breaks.
On the top of my message I see "Extra line breaks in this message were
removed" :)
I couldn't understand where was the "extra line break" though.

Gary Johnson

unread,
Sep 24, 2008, 5:15:51 PM9/24/08
to

If Outlook is bold enough to remove what it considers to be "extra" line
breaks, it's probably bold enough to add line breaks where it thinks
they belong. I don't use Outlook so I can't check this out myself, but
I Googled for

Outlook extra line breaks in this message were removed

and found a number of articles about this mis-feature of Outlook.
Here's one solution (posted by "David" at
http://www.masternewmedia.org/newsletter_publishing/newsletter_formatting/remove_line_breaks_issue_Microsoft_Outlook_2003_when_publishing_text_newsletters_20051217.htm):

Click on Tools -> Options. Then on the Preferences tab, under E-mail,
click the E-mail Options button. Then the fourth checkbox (which is
turned on by default) says "Remove extra line breaks in plain text
messages". Turn that checkbox off and Outlook won't try to format your
messages for you anymore.

I realize that that you're seeing wrapped lines rather than removed line
breaks, but that setting may fix the line-wrapping problem, or you may
see a "don't wrap lines" checkbox among those formatting settings.

You might also try sending your log files to an account you can access
with a more well-behaved mail reader and see if the lines are wrapped
there.

--
Gary Johnson

#! /shell/nerd

unread,
Sep 26, 2008, 8:40:49 PM9/26/08
to
> Here's one solution (posted by "David" athttp://www.masternewmedia.org/newsletter_publishing/newsletter_format...

>
> Click on Tools -> Options. Then on the Preferences tab, under E-mail,
> click the E-mail Options button. Then the fourth checkbox (which is
> turned on by default) says "Remove extra line breaks in plain text
> messages". Turn that checkbox off and Outlook won't try to format your
> messages for you anymore.
>
> I realize that that you're seeing wrapped lines rather than removed line
> breaks, but that setting may fix the line-wrapping problem, or you may
> see a "don't wrap lines" checkbox among those formatting settings.
>
> You might also try sending your log files to an account you can access
> with a more well-behaved mail reader and see if the lines are wrapped
> there.
>
> --
> Gary Johnson

That helps Gary. Thanks a lot !! Now it looks the way I wanted.
Yet another MS "unwated" feature(bug). LOL :)

0 new messages