1832339 Members
2415 Online
110041 Solutions
New Discussion

email notification

 
Ian Prior
Occasional Contributor

email notification

Hi all, I was wondering if anyone can help.

All I need to do is create a script, that will run a program, cat its out put to a file then email my at works email address.

Now I can create the script to run the job and create the file, but can not seem to get the email part working. I was using an example from one of the threads below ie

mail me@myserver

the problem I have is in vi when I type the @ command, it moves the cursor to the start of the line (I dont really use vi that much!!! as you can probably tell)..

I also tried to email myself the file from the command line but when ever I type the @ sign it shows the @ then starts a new line. Does anyone know what I am doing wrong.

PS I am not to familiar with HPUX
5 REPLIES 5
Jeff_Traigle
Honored Contributor

Re: email notification

Run stty. See what @ is set to (likely kill). Change whichever one it is to something else.

Example:

stty kill ^V^X

(Ctrl-V allows you to enter a Ctrl character as you type.)
--
Jeff Traigle
Peter Godron
Honored Contributor

Re: email notification

Ian,
I suspect a possible keyboard problem.
stty -a should show you all your keysymbols. Look for eol; is it set to ^@ ?

you can set it with: stty eol CNTL+@
where CNTL means press the CNTL key.
Once that is sorted, you should be able to do:
mailx -s"test" me@myserver < file.txt
Ian Prior
Occasional Contributor

Re: email notification

Thanks that works great :-)
Ian Prior
Occasional Contributor

Re: email notification

Closed
Kent Ostby
Honored Contributor

Re: email notification

Here is the settings we use for stty:

stty erase "^H" kill "^U" intr "^C" eof "^D"

We have it in .profile so that we don't have to set it every time we want to run vi.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"