Article View: es.comp.os.linux.programacion
Article #9821Re: Bash (shell script) enviar mail
From: Rick Dekkard
Date: Tue, 07 May 2002 22:22
Date: Tue, 07 May 2002 22:22
34 lines
2085 bytes
2085 bytes
por ejemplo: echo hola | mail root@localhost mandar�a un mail diciendo "hola" al root. Jorge wrote: > Hola a todos y gracias de antemano. > > Esoty haciendo un peque�o script en bash para que me env�e un mail > cuando una de las particiones se empieze a llenar. > > Por ahora hago esto: > > #!/bin/bash > # para enviar un mail > df | grep [4-9][0-9]% > kk > if test -s kk > then > echo "tiene `cat kk`" > fi > > De esta forma me muetra el resultado correcto que quiero que me llege en > el mail, pero si le a�ado esta linea: > mail jorge@mipaginapersonal.com > > No s� c�mo hacer para que el cat se meta en el cuerto del mensaje ni c�mo > poner el asunto. > > > Muchas gracias por las ideas, sugerencias, aportaciones, pegas, etc... > Jorge > >
Technical Details
Message-ID:
<3CD853B7.2070708@QUITAESTOnervhq.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!btnet-peer!btnet!newsfeed.bt.es!news.bt.es!not-for-mailReferences:
<ab8stf$8sv$1@nsnmrro2-gest.nuria.telefonica-data.net>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,CP1252 X-Google-Thread: f86c8,c5fd9480149bd3c8 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-05-07 09:15:37 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!btnet-peer!btnet!newsfeed.bt.es!news.bt.es!not-for-mail From: Rick Dekkard <dekkard@QUITAESTOnervhq.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: Bash (shell script) enviar mail Date: Tue, 07 May 2002 18:22:47 -0400 Organization: Supercable Andalucia, S.A. Lines: 35 Message-ID: <3CD853B7.2070708@QUITAESTOnervhq.org> References: <ab8stf$8sv$1@nsnmrro2-gest.nuria.telefonica-data.net> NNTP-Posting-Host: 212.79.128.146 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: titan.bt.es 1020787305 5127 212.79.128.146 (7 May 2002 16:01:45 GMT) X-Complaints-To: abuse@bt.es NNTP-Posting-Date: 7 May 2002 16:01:45 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020501 X-Accept-Language: en-us, ja Cache-Post-Path: seux119!unknown@cliente-217216181137.cm128.alnpa.supercable.es X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)