I have log files will mail from LINUX to my PC (MS exchange and outlook). When I look the E-MAIL, the log file line is unwrap. My script did use "unix2dos" to convert format. anyone know why? ====== script ============= tail -30 /var/log/messages > /tmp/diskmsg.log unix2dos /tmp/diskmsg.log mail -s "Check log" dba101@yahoo.com </tmp/diskmsg.log
_________________________________________________________________________________________________________ 知識+ 的電玩高手全都在這裡! http://tw.knowledge.yahoo.com/dir/group_buzz?time=total&type=article&...
mcclnx mcc wrote:
I have log files will mail from LINUX to my PC (MS exchange and outlook).
When I look the E-MAIL, the log file line is unwrap. My script did use "unix2dos" to convert format. anyone know why?
The lines should not be wrapped, why would you expect them to be?
nate
I have typo. The line is "wrap (continue on one line)".
--- 08/8/28 (星期四),nate centos@linuxpowered.net 寫道:
寄件者: nate centos@linuxpowered.net 主旨: Re: [CentOS] unix2dos did NOT fix line wrap problem on PC 收件者: centos@centos.org 日期: 2008 8 28 星期四 上午 11:05
mcclnx mcc wrote:
I have log files will mail from LINUX to my PC (MS exchange and outlook).
When I look the E-MAIL, the log file line is unwrap. My script did use "unix2dos" to convert format. anyone know why?
The lines should not be wrapped, why would you expect them to be?
nate
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
_________________________________________________________________________________________________________ 想知道無聊生活如何大變身嘛? http://tw.promote.mail.yahoo.com/dc/change.html
On Thu, Aug 28, 2008 at 9:57 AM, mcclnx mcc mcclnx@yahoo.com.tw wrote:
I have log files will mail from LINUX to my PC (MS exchange and outlook).
When I look the E-MAIL, the log file line is unwrap. My script did use "unix2dos" to convert format. anyone know why?
====== script =============
tail -30 /var/log/messages > /tmp/diskmsg.log unix2dos /tmp/diskmsg.log mail -s "Check log" dba101@yahoo.com </tmp/diskmsg.log
unix2dos has nothing to do with the length of a line. It only changes the line-end characters that occur when a new line is specifically indicated (i.e. at the end of each log entry).
Wrapping is entirely a function of the program in which you are viewing the text. So tweak your Outlook to wrap or not-wrap as you see fit.
On the pc - open the file using wordpad.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Jeff Sent: Thursday, August 28, 2008 11:13 AM To: CentOS mailing list Subject: Re: [CentOS] unix2dos did NOT fix line wrap problem on PC
On Thu, Aug 28, 2008 at 9:57 AM, mcclnx mcc mcclnx@yahoo.com.tw wrote:
I have log files will mail from LINUX to my PC (MS exchange and outlook).
When I look the E-MAIL, the log file line is unwrap. My script did use "unix2dos" to convert format. anyone know why?
====== script =============
tail -30 /var/log/messages > /tmp/diskmsg.log unix2dos /tmp/diskmsg.log mail -s "Check log" dba101@yahoo.com </tmp/diskmsg.log
unix2dos has nothing to do with the length of a line. It only changes the line-end characters that occur when a new line is specifically indicated (i.e. at the end of each log entry).
Wrapping is entirely a function of the program in which you are viewing the text. So tweak your Outlook to wrap or not-wrap as you see fit.
On Thursday 28 August 2008 18:05:26 Stephen Moccio wrote:
On the pc - open the file using wordpad.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Jeff Sent: Thursday, August 28, 2008 11:13 AM To: CentOS mailing list Subject: Re: [CentOS] unix2dos did NOT fix line wrap problem on PC
On Thu, Aug 28, 2008 at 9:57 AM, mcclnx mcc mcclnx@yahoo.com.tw wrote:
I have log files will mail from LINUX to my PC (MS exchange and outlook).
When I look the E-MAIL, the log file line is unwrap. My script did use "unix2dos" to convert format. anyone know why?
====== script =============
tail -30 /var/log/messages > /tmp/diskmsg.log unix2dos /tmp/diskmsg.log mail -s "Check log" dba101@yahoo.com </tmp/diskmsg.log
unix2dos has nothing to do with the length of a line. It only changes the line-end characters that occur when a new line is specifically indicated (i.e. at the end of each log entry).
Wrapping is entirely a function of the program in which you are viewing the text. So tweak your Outlook to wrap or not-wrap as you see fit.
Do a google search for "pfe.exe" (Programmers File Editor). Its a freeware windoz text editor that handles linux / Unix or dos / windows end of line characters with out any problems. If you can't find it e mail me off list and I can attach it to my reply, its only a 2/3mb file. Regards John
Do a google search for "pfe.exe" (Programmers File Editor). Its a freeware windoz text editor that handles linux / Unix or dos / windows end of line characters with out any problems. If you can't find it e mail me off list and I can attach it to my reply, its only a 2/3mb file. Regards John
A much better and more up to date option would be Notepad++. When you try it, you will know why.
on 8-29-2008 4:46 AM Miguel Medalha spake the following:
Do a google search for "pfe.exe" (Programmers File Editor). Its a freeware windoz text editor that handles linux / Unix or dos / windows end of line characters with out any problems. If you can't find it e mail me off list and I can attach it to my reply, its only a 2/3mb file. Regards John
A much better and more up to date option would be Notepad++. When you try it, you will know why.
Also the vim port to windows gives you something that is on every linux released.
On Fri, Aug 29, 2008 at 4:46 AM, Miguel Medalha miguelmedalha@sapo.pt wrote:
A much better and more up to date option would be Notepad++. When you try it, you will know why.
vim, which is available for Window$ (at the SimTel repository, but google is your best bet for where) and comes with CentOS (and most modern Linux distros), will do that, too. If you're used to the vi interface (like I am), that's the best choice. If not, ymmv.
mhr