Martin Dellwo on 9 Apr 2012 12:58:06 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Why does -t option of ssh cause mail to not be sent?...


Though you've got a solution with 'nohup', another thought to try: append a status output as shown below.  I'm not really sure what it would mean if it worked, other than the pipe is forced to wait for a status from the mail command?  Maybe it has to wait for the internal fork to complete in that case.

echo "hello" | mail -s "Test" fred || echo 'Mail command failed'



On Mon, Apr 9, 2012 at 3:48 PM, Fred Stluka <fred@bristle.com> wrote:
On 4/9/12 2:22 PM, Martin Dellwo wrote:
Just out of curiosity, can you try it with tcsh instead of csh?  Or with bash?

On this server, /bin/csh is a symlink to /bin/tcsh, so that shouldn't
matter.  I tried it anyhow.  Same problem.

   #!/bin/tcsh

   echo "hello" | mail -s "Test" fred

I also tried bash.  Same problem.

   #!/bin/bash

   echo "hello" | mail -s "Test" fred

--Fred
------------------------------------------------------------------------
Fred Stluka -- mailto:fred@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
------------------------------------------------------------------------

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



--
Martin Dellwo
cell: (484) 437-3662
martin.dellwo@gmail.com
http://www.linkedin.com/in/martindellwo

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug