commande mailx : spaces in the title


 
Thread Tools Search this Thread
Operating Systems AIX commande mailx : spaces in the title
# 1  
Old 04-08-2009
commande mailx : spaces in the title

Hello !

I use mailx to send emails.
I use it like that
Code:
  mailx -s $titleMail $mailAdr < BODY_MAIL.txt

The problem , is if i have some spaces in the variable titleMail it is
considered by the command mailx like other mail adress to send the mail.

Anyone would have a suggestion on how to successfully have a title for the mail including spaces ?
# 2  
Old 04-08-2009
We've vound teh problem ; it was a basic mistake.

In fact the right use of the command would have been :
Code:
mailx -s "$titleMail" $mailAdr < BODY_MAIL.txt

This way we can have spaces in the variable titleMail.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract title

need a bit of help please i have a htmlfile in the file there is a long list of txt each line has a different title i want to extract all the titles with egrep, sed, awk, and save them to a txt.file example extract the bits in red from this <h3... (8 Replies)
Discussion started by: bob123
8 Replies

2. UNIX for Dummies Questions & Answers

Pb commande externe \r

J'ai un soucis avec une commande externe... la voici : #!/bin/bash/ mkdir lol mkdir not sleep 2 mkdir glop Mon bash l'éxécute (déjà ça :rolleyes:) à sa façon..... Je me retrouve avec non pas 3 dossiers lol, not et glop. Mais les dossiers : lol?, not? et glop (oui ! un de bon !!!!!). Et, une... (9 Replies)
Discussion started by: sluvah
9 Replies

3. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

4. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

5. Shell Programming and Scripting

sum two numbers on a grep commande with the parameter -n

Hello, I want to know how i can sum two numbers in a grep command with the parameter -n. this code return line number and the line who have the "pattern" : *\).*/\1/p') ] but now i want to suw *\).*/\1/p')] with 1 to have the next line: *\).*/\1/p')] + 1 : it can't work. Thanks you (4 Replies)
Discussion started by: samara80
4 Replies

6. UNIX for Dummies Questions & Answers

how to append spaces(say 10 spaces) at the end of each line based on the length of th

Hi, I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is. I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies

7. Shell Programming and Scripting

cree a variable from a commande result

Hi everybody I m looking the put the result of a commande to a Variable i explain here is my command: cat sortie | grep "^"| awk '{ print $1}' 15 sortie is a text file I want to put the result of command in a variable X and the end i would like echo $X 15 (3 Replies)
Discussion started by: kykyboss
3 Replies

8. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

9. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies
Login or Register to Ask a Question