Sponsored Content
Top Forums Shell Programming and Scripting Text format problem with xmail Post 302507206 by ctsgnb on Wednesday 23rd of March 2011 05:20:18 AM
Old 03-23-2011
I guess there are some trailing \n in dec2 whereas in dec1 you have ^M which are in fact \r\n sequence (see man ascii) at the end of the lines.

try this (if unix2dos command is available on your plateform)
Code:
unix2dos dec2.tmp dec2.tmp

Code:
mailx -s "dec2" " myadress@xxx.com" < dec2.tmp

if unix2dos not available you can try :

Code:
printf ",s/.*/&\r/\nw\nq\n" | ed -s dec2.tmp

this will add the missing \r so your end of line will have the "windows style" sequence \r\n instead of the unix single \n.
So outlook may then be able parse this sequence as "newline" instead of the \n which outlook may not be able to understand as being a newline and put everything inline.
then try
Code:
mailx -s "dec2" " myadress@xxx.com" < dec2.tmp

and see if it is displayed as expected

Last edited by ctsgnb; 03-23-2011 at 06:53 AM..
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell scripts that uses mail/xmail

Hello, i'm wondering is it possible to include the 'notify me' tag which s used with outlook or some web-based email clients that notify you as soon as that user read the email with mail/xmail/sendmail etc. i'm having scripts that sends a daily email to my sysadmins and i wish to know when... (1 Reply)
Discussion started by: Bashar
1 Replies

2. UNIX for Dummies Questions & Answers

Mail/Xmail doesn't work on Solaris 10

Hi again everyone. I have recently installed Solaris 10 on a server. Everything seems to work fine (users can be added and can log in, internet connectivity works, etc). However I'm struggling to get mail or mailx to work. Say there are two users on my server, Bob and Mary. Server hostname... (3 Replies)
Discussion started by: EugeneG
3 Replies

3. Shell Programming and Scripting

Format problem of text file

Folks pardon me for trivial question. After searching the entire forum i decided to post this question. I have a file with some numbers with commas like this 123,456,789 If i open this textfile with either notepad or wordpad they ae looking absolutely fine. When I open this with excel file... (13 Replies)
Discussion started by: repinementer
13 Replies

4. Shell Programming and Scripting

text format

Hi all I need you help to create script get the below output Thanks in advance. Ashan name.txt Wymouth_MRI_Lun79 PACS DR TEMP R drive stat.txt NO Normal Normal Out need Wymouth_MRI_Lun79 NO Normal PACS DR TEMP R drive Normal (1 Reply)
Discussion started by: ashanabey
1 Replies

5. Shell Programming and Scripting

Text Format

I'd like to format a text in unix before mailing it to users. I want to change color and font of my plain text in unix. Thanks.. (1 Reply)
Discussion started by: Sara_84
1 Replies

6. Shell Programming and Scripting

Format problem while converting text file to csv

Hi , I need a help in following scenario.I tried searching in google but couldn't able to find the exact answer. Sorry if i am re-posting already answered query. While i am trying to convert into log file into csv i couldn't able to get the format which i am looking for. I converted file... (4 Replies)
Discussion started by: varmas424
4 Replies

7. Shell Programming and Scripting

Need script for transferring bulk files from one format to text format

"Help Me" Need script for transferring bulk files from one format to text format in a unix server. Please suggest (2 Replies)
Discussion started by: Kranthi Kumar
2 Replies
doctools::tcl::parse(3tcl)					Documentation tools					doctools::tcl::parse(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
doctools::tcl::parse - Processing text in 'subst -novariables' format SYNOPSIS
package require Tcl 8.4 package require snit package require fileutil package require logger package require struct::list package require struct::stack package require struct::set package require treeql ::doctools::tcl::parse text tree text ?root? ::doctools::tcl::parse file tree path ?root? _________________________________________________________________ DESCRIPTION
This package provides commands for parsing text with embedded Tcl commands as accepted by the Tcl builtin command subst -novariables. The result of the parsing is an abstract syntax tree. This is an internal package of doctools, for use by the higher level parsers processing the docidx, doctoc, and doctools markup languages. API
::doctools::tcl::parse text tree text ?root? The command takes the text and parses it under the assumption that it contains a string acceptable to the Tcl builtin command subst -novariables. Errors are thrown otherwise during the parsing. The format used for these errors in described in section Error format. The command returns the empty string as it result. The actual result of the parsing is entered into the tree structure tree, under the node root. If root is not specified the root of tree is used. The tree has to exist and be the command of a tree object which supports the same methods as trees created by the package struct::tree. In case of errors tree will be left in an undefined state. ::doctools::tcl::parse file tree path ?root? The same as text, except that the text to parse is read from the file specified by path. ERROR FORMAT
When the parser encounters a problem in the input it will throw an error using the format described here. [1] The message will contain the reason for the problem (unexpected character or end of input in input), the character in question, if any, and the line and column the problem was found at, in a human readable form. This part is not documented further as its format may change as we see fit. It is intended for human consumption, not machine. [2] The error code however will contain a machine-readable representation of the problem, in the form of a 5-element list containing, in the order listed below [1] the constant string doctools::tcl::parse [2] the cause of the problem, one of char Unexpected character in input eof Unexpected end of the input [3] The location of the problem as offset from the beginning of the input, counted in characters. Note: Line markers count as one character. [4] The line the problem was found on (counted from 1 (one)), [5] The column the problem was found at (counted from 0 (zero)) TREE STRUCTURE
After successfully parsing a string the generated tree will have the following structure: [1] In the following items the word 'root' refers to the node which was specified as the root of the tree when invoking either text or file. This may be the actual root of the tree. [2] All the following items further ignore the possibility of pre-existing attributes in the pre-existing nodes. If attributes exists with the same names as the attributes used by the parser the pre-existing values are written over. Attributes with names not clash- ing with the parser's attributes are not touched. [3] The root node has no attributes. [4] All other nodes have the attributes type The value is a string from the set { Command , Text , Word } range The value is either empty or a 2-element list containing integer numbers. The numbers are the offsets of the first and last character in the input text, of the token described by the node,. line The value is an integer, it describes the line in the input the token described by the node ends on. Lines are counted from 1 (one). col The value is an integer, it describes the column in the line in the input the token described by the node ends on. Columns are counted from 0 (zero). [5] The children of the root, if any, are of type Command and Text, in semi-alternation. This means: After a Text node a Command node has to follow, and anything can follow a Command node, a Text or other Command node. [6] The children of a Command node, if any, are of type Command, and Text, and Word, they describe the arguments of the command. [7] The children of a Word node, if any, are of type Command, Text, in semi-alternation. This means: After a Text node a Command node has to follow, and anything can follow a Command node, a Text or other Command node. [8] A Word node without children represents the empty string. [9] All Text nodes are leaves of the tree. [10] All leaves of the tree are either Text or Command nodes. Word nodes cannot be leaves. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
Tcl syntax, command, doctools, parser, subst, word CATEGORY
Documentation tools COPYRIGHT
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools2base 1 doctools::tcl::parse(3tcl)
All times are GMT -4. The time now is 10:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy