issue with mail syntax in unix

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinay_renu2001
Participant
Posts: 46
Joined: Wed Sep 28, 2005 9:24 am

issue with mail syntax in unix

Post by vinay_renu2001 »

Hi

I have an issue with the mail syntax:

Here it is

mail -s $EMAILSUBJECT $EMAILADDRESS < EMAILFILE

Variable $EMAILSUBJECT is suppose to substitute the value of it as a subject. But it is not doing that. I tried to put in quotes also. Instead of taking the variable value it is sending one of the email id from the variable "$EMAILADDRESS" as subject.

Actually, this is on:
Linux nps23194 2.6.9-34.ELsmp

Execuse me for posting a non PX post.

Can anyone give their suggestions!!

Thanks
Thanks and Regards
Vin
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the variable EMAILSUBJECT actually defined? If it were not, you would see the behaviour you are describing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

mailx -s "$SUBJECT" $USERS

Works fine for me.
Mamu Kim
vinay_renu2001
Participant
Posts: 46
Joined: Wed Sep 28, 2005 9:24 am

Post by vinay_renu2001 »

kduke wrote:mailx -s "$SUBJECT" $USERS

Works fine for me.

Hi duke,

I made some progress on this, but, When i tried to use the same, I have a big sentence of subject in between spaces for each word.

Now, when i tried to use the above, its putting the first word of the sentence as a subject and the rest of the sentence is taking as email id's.

I tried placing the quotes in various ways (single and double), but none of them worked.

Can you please help me on this.

Hi Ray,

Variable EMAILSUBJECT was defined.


Thanks
Thanks and Regards
Vin
Post Reply