Re: sending the output of a script through mail

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

 



On Thu, 2006-09-21 at 11:25 +0530, ankush grover wrote:
>  I have written a script which shows the local and lan address of a system.
> 
> #!/bin/sh
> test= ifconfig -a | grep addr: | awk '{print $2}'
> 
> 
> I want to send the output of this command to a user through mail. How
> can I achieven this ?

Hmm, well that looks like you can work most things out for yourself, see
if these hints lets you work out the rest:  

Have a look at the "mail" command, and add a bit more to the line in
your script, using it.  

You may have to also configure sendmail so that locally generated mail
goes out with a real internet domain name (i.e. you're unlikely be able
to send out an e-mail from root@localhost, for instance).  I think
that's a "masquerading" option, just going from memory.  But you might
want to look at the sendmail website, for more help with configuring
sendmail than the docs that come with Fedora.

-- 
(Currently running FC4, occasionally trying FC5.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux