Mail subject splitted


 
Thread Tools Search this Thread
Operating Systems AIX Mail subject splitted
# 8  
Old 09-18-2015
As you said, it was working - what is going through my mind is "What else has changed?". e.g., did you recently update AIX? Have you changed your default shell (and there is no "hash-bang aka #! starting the script).

In short, on the face of it, your command should work fine. I have used commands like that many many times with no problem.

Perhaps copy the script (to always have the original) and add "set -x" at the start so that it prints the commands as it executes them.

And/or just try "ksh -x script", if ksh is the shell that is suppossed to be executing it. I would assume (if you are now using bash - that bash also has something similiar.) And, thinking of bash - while I am not a regular user I recall that bash had several patches re: "remote" executition.

So, besides all the other questions you need to answer - also think about what else may have changed that might be the root cause of the issues you are now facing.

Hope this helps!
This User Gave Thanks to MichaelFelt For This Post:
# 9  
Old 09-21-2015
The mail is working fine now since we rebooted and the subject of the test is OK "three word subject" add no error, but when it was not working it would be
word... User unknown
subject... User unknown

$ type mail
mail is a tracked alias for /usr/bin/mail

Code:
 printf '%s\n' "$IFS" "$PATH" "$SHELL" | od -bc
0000000  040 011 012 012 057 161 144 170 057 143 151 163 065 056 070 057
              \t  \n  \n   /   q   d   x   /   c   i   s   5   .   8   /
0000020  151 156 164 145 147 162 141 164 157 162 057 141 144 164 137 154
           i   n   t   e   g   r   a   t   o   r   /   a   d   t   _   l
0000040  157 147 151 142 145 143 057 142 151 156 072 057 161 144 170 057
           o   g   i   b   e   c   /   b   i   n   :   /   q   d   x   /
0000060  143 151 163 065 056 070 057 151 156 164 145 147 162 141 164 157
           c   i   s   5   .   8   /   i   n   t   e   g   r   a   t   o
0000100  162 057 141 144 164 137 154 157 147 151 142 145 143 057 163 143
           r   /   a   d   t   _   l   o   g   i   b   e   c   /   s   c
0000120  162 151 160 164 163 072 057 161 144 170 057 143 151 163 065 056
           r   i   p   t   s   :   /   q   d   x   /   c   i   s   5   .
0000140  070 057 151 156 164 145 147 162 141 164 157 162 057 142 151 156
           8   /   i   n   t   e   g   r   a   t   o   r   /   b   i   n
0000160  072 057 161 144 170 057 143 151 163 065 056 070 057 151 156 164
           :   /   q   d   x   /   c   i   s   5   .   8   /   i   n   t
0000200  145 147 162 141 164 157 162 057 143 157 156 164 162 151 142 072
           e   g   r   a   t   o   r   /   c   o   n   t   r   i   b   :
0000220  057 161 144 170 057 143 151 163 065 056 070 057 151 156 164 145
           /   q   d   x   /   c   i   s   5   .   8   /   i   n   t   e
0000240  147 162 141 164 157 162 057 163 142 151 156 072 057 161 144 170
           g   r   a   t   o   r   /   s   b   i   n   :   /   q   d   x
0000260  057 143 151 163 065 056 070 057 151 156 164 145 147 162 141 164
           /   c   i   s   5   .   8   /   i   n   t   e   g   r   a   t
0000300  157 162 057 144 142 155 163 057 142 151 156 072 057 161 144 170
           o   r   /   d   b   m   s   /   b   i   n   :   /   q   d   x
0000320  057 143 151 163 065 056 070 057 151 156 164 145 147 162 141 164
           /   c   i   s   5   .   8   /   i   n   t   e   g   r   a   t
0000340  157 162 057 164 143 154 057 142 151 156 072 057 161 144 170 057
           o   r   /   t   c   l   /   b   i   n   :   /   q   d   x   /
0000360  143 151 163 065 056 070 057 151 156 164 145 147 162 141 164 157
           c   i   s   5   .   8   /   i   n   t   e   g   r   a   t   o
0000400  162 057 143 154 147 165 151 057 142 151 156 072 057 161 144 170
           r   /   c   l   g   u   i   /   b   i   n   :   /   q   d   x
0000420  057 143 151 163 065 056 070 057 151 156 164 145 147 162 141 164
           /   c   i   s   5   .   8   /   i   n   t   e   g   r   a   t
0000440  157 162 057 143 154 147 165 151 057 152 141 166 141 057 142 151
           o   r   /   c   l   g   u   i   /   j   a   v   a   /   b   i
0000460  156 072 057 161 144 170 057 143 151 163 065 056 070 057 151 156
           n   :   /   q   d   x   /   c   i   s   5   .   8   /   i   n
0000500  164 145 147 162 141 164 157 162 057 165 163 145 162 143 155 144
           t   e   g   r   a   t   o   r   /   u   s   e   r   c   m   d
0000520  163 072 057 165 163 162 057 142 151 156 072 057 145 164 143 072
           s   :   /   u   s   r   /   b   i   n   :   /   e   t   c   :
0000540  057 165 163 162 057 163 142 151 156 072 057 165 163 162 057 165
           /   u   s   r   /   s   b   i   n   :   /   u   s   r   /   u
0000560  143 142 072 057 165 163 162 057 150 143 151 145 156 147 057 150
           c   b   :   /   u   s   r   /   h   c   i   e   n   g   /   h
0000600  143 151 057 142 151 156 072 057 165 163 162 057 142 151 156 057
           c   i   /   b   i   n   :   /   u   s   r   /   b   i   n   /
0000620  130 061 061 072 057 163 142 151 156 072 056 072 057 165 163 162
           X   1   1   :   /   s   b   i   n   :   .   :   /   u   s   r
0000640  057 154 157 143 141 154 057 142 151 156 072 057 165 163 162 057
           /   l   o   c   a   l   /   b   i   n   :   /   u   s   r   /
0000660  154 157 143 141 154 057 163 143 162 151 160 164 163 072 057 161
           l   o   c   a   l   /   s   c   r   i   p   t   s   :   /   q
0000700  144 170 057 142 151 156 012 057 142 151 156 057 153 163 150 012
           d   x   /   b   i   n  \n   /   b   i   n   /   k   s   h  \n
0000720

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE-tags for posting code, output or data. It makes the things much better readable.Thank you.

Last edited by bakunin; 09-21-2015 at 02:55 PM..
# 10  
Old 09-21-2015
So, knowing that things work after a reboot tells us that something was messed up in your environment. But, since you didn't show us the results until after you rebooted, we'll probably never know what was wrong. (It would have also been nice to know if logging out and logging back in would have solved your problem without rebooting.)

But, my best guesses would still be that either your IFS setting had been modified to include the double-quote character or that your PATH setting had been modified to find a different mail utility than the one you're now finding in /usr/bin.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep the last line and put on mail subject

I have mail: cat /home/oracle/scripts/dbsizedaily.txt | mail -s "$TODAY: PROD DB Size" $RECIPIENTS I like to get and put USED_GB and %USED of the very last row from /home/oracle/scripts/dbsizedaily.txt. /home/oracle/scripts/dbsizedaily.txt has : DATE TIME TOTAL_GB USED_GB ... (6 Replies)
Discussion started by: Daniel Gate
6 Replies

2. Shell Programming and Scripting

Subject line missing while sending mail

Hi, I have below script PROJECT_NAME=UDL/UDL_Weekly sub= echo ${PROJECT_NAME}|cut -d "/" -f2 cat pr.sh|mail -s "`hostname`: $sub failed" sonu.pal@xyz.com While running the script I am receiving the subject line in mail as " podetlsapp01: failed' instead of " podetlsapp01: ... (1 Reply)
Discussion started by: sonu_pal
1 Replies

3. Shell Programming and Scripting

adding hostname and date in subject of the mail

Hi Team, I coded my code to send mail to some reciepents with subject and date. Can somebody suggest me how to add host name to subject ? and the below code is correct for date ? my aim is to send mail with "subject in < hostname> on <date>".When i execute this script on my server its hung... (3 Replies)
Discussion started by: rocking77
3 Replies

4. Shell Programming and Scripting

mail: subject and body text

HI, After giving the mail -e name@domain.com its asking the subject : after this its enter in to the body of the mail i.e. (in edit mode) How to end this edit process to send mail ? (2 Replies)
Discussion started by: thelakbe
2 Replies

5. UNIX for Dummies Questions & Answers

mail -s not showing subject on emails

Hi, I have a cron job that creates backups nightly and sends me an email with output from the script. I'm recieving the email and the output; however, the subject field is always empty. Here is what I have in my crontab 00 23 * * * sh /test_backup/test_script | mail -s "Backups"... (2 Replies)
Discussion started by: orahi001
2 Replies

6. UNIX for Advanced & Expert Users

date need to be add in the subject of the mail.

Hi Am fetching a weekly report pf data..once i fetched the data i need a sent report by mail. In the subject of that mail i want to sent a message like.. SUBJECT :The report had been fetched from (01/12/08 to 07/12/08). I need to send a report like this every week with that particular... (2 Replies)
Discussion started by: bobprabhu
2 Replies

7. Shell Programming and Scripting

sort mail based on subject in unix.

Hi, I have a complicated requirement.I need to search for a particular pattern in the subject of incoming mail to a set of users and need to save the content of the mail in a file which will be uploaded to a file server. I have a perl script to do the upload.I need a script to sort the mail... (2 Replies)
Discussion started by: sriram.s
2 Replies

8. UNIX for Dummies Questions & Answers

How to set Subject in 'mail' ?

Hi, I am trying to send some file to some mail ids using mail command in UNIX. Now the issue is I am not able to find how to add "Subject text" to the command. So I am using command like "mail abc@yahoo.com < file_name" Now if I use simple mail command I can set subject text by using... (2 Replies)
Discussion started by: hkapil
2 Replies

9. UNIX for Dummies Questions & Answers

Mail subject output of script

I am new to this site so please bear with my ignorances. I have started playing with mail on AIX 4.3.3 with many successes (thanks to this site) but am now stuck. I want to send a mail with the subject as the result of a script, eg. I want the mail body to read as the output from 'df -k... (4 Replies)
Discussion started by: kiano
4 Replies

10. UNIX for Dummies Questions & Answers

Send a mail with a subject and an attachement

Dear All: I want to send a message to a list of people with a subject and an attachement, currently I am using the following command into a shell script: uuencode $FILENAME.gz $FILENAME.gz | mail john.kennedy@mycompany.com m.m@mycompany.com With this command I can send the message for a... (1 Reply)
Discussion started by: josecollantes
1 Replies
Login or Register to Ask a Question