Christopher <blackpack3000@yahoo.com> wrote:
> Can someone help me with a simple email script?
> I want to execute it from the termainal.
> Something like this..
> I run IFCONFIG > (redirect results to file) then email it.
#!/bin/bash
email_address="you@you.org"
subject="ifconfig results"
PATH=/bin:/usr/bin:/sbin:/usr/sbin
ifconfig | mail -s $subject $email_address
> And I guess I need some advice on a scripting language. Whatever is
> standard wit Redhat 9.
Well, for something as simple as the above, I used bash. But for
serious scripting, I almost always choose perl. "The swiss army
chainsaw" of scripting languages.
Do a Google search on perl, you'll find a lot of good resources.
--
Jim Buchanan
jbuchana@kokomo1.net jbuchana@buchanan1.net
===================
http://www.buchanan1.net/ ==========================
"We already have a zillion minimalistic languages. CS departments are
full of 'em. Sometimes you have to go around stomping the little
beggars just to keep their population in check." -Larry Wall
================= Visit:
http://www.thehungersite.com ==================