This is a discussion on mail script within the Linux General forums, part of the Linux Forums category; Hi Can someone help me with a simple email script? I want to execute it from the termainal. Something like ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi
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. I have evolution setup for emailing. Do I need to setup some files some where or can I use a terminal command? And I guess I need some advice on a scripting language. Whatever is standard wit Redhat 9. Any advice is helpful. Thanks |
|
|||
|
Christopher wrote:
> I want to execute it from the termainal. > > Something like this.. > > I run IFCONFIG > (redirect results to file) then email it. ..... in two words, "man mail" ... you can do it from the CLI .. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ Michael J. Tobler: motorcyclist, surfer, # Black holes result skydiver, and author: "Inside Linux", # when God divides the "C++ HowTo", "C++ Unleashed" # universe by zero |
|
|||
|
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 ================== |
|
|||
|
jbuchana@buchanan1.net wrote:
> I almost always choose perl. "The swiss army > chainsaw" of scripting languages. ..... BWA HAHAHAHAHHAHAHAHHAHAHA. good one :) .. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ Michael J. Tobler: motorcyclist, surfer, # Black holes result skydiver, and author: "Inside Linux", # when God divides the "C++ HowTo", "C++ Unleashed" # universe by zero |
![]() |
| Thread Tools | |
| Display Modes | |
|
|