Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-15-2004, 01:50 PM   #1
LQ Newbie
Registered: Jul 2004
Posts: 15

Rep: Reputation: 0
linux scripting

hey everyone...

red hat 9 user here... have a question about scripting...

i want a script to run everytime i start up my PC that will grep the entire contents of an ifconfig and output it to a txt file, and email the text file to myself.

i beleive i have sendmail running properly... maybe someone here can point me in the right direction?
Old 11-15-2004, 02:02 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,692

Rep: Reputation: 232Reputation: 232Reputation: 232
You may add it do starting scripts (/etc/rc.d/init.d and then symlinked to the right directories: /etc/rcX.d where X is your runlevel; that's 'cleaner', but harder method) or just add the commend to run it to /etc/rc.local (that's one of the scripts that are run at boot automaticaly).
Old 11-15-2004, 02:02 PM   #3
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
You could add something like this to the end of rc.local:
/sbin/ifconfig | grep something | mail -s "IP details"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
linux scripting help anirudh Programming 6 03-04-2005 11:33 PM
Scripting in Linux Rv5 Programming 2 09-05-2004 11:14 PM
Linux scripting Cybercool Linux - Newbie 5 04-16-2004 02:57 AM
Linux Scripting SainT1337 Linux - General 3 11-30-2003 02:12 PM
Linux Scripting atlight Linux - General 3 10-29-2003 09:11 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration