LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need to create script that gives me network computer information. (https://www.linuxquestions.org/questions/programming-9/need-to-create-script-that-gives-me-network-computer-information-765044/)

rahilmaknojia 10-28-2009 09:32 AM

Need to create script that gives me network computer information.
 
Hello,

I am new to scripting and I have planned to create script which gives me network computer inforamtion. therefore, I want to know how to write script that sends me computer information to my email add.

TB0ne 10-28-2009 10:31 AM

Quote:

Originally Posted by rahilmaknojia (Post 3735378)
Hello,

I am new to scripting and I have planned to create script which gives me network computer inforamtion. therefore, I want to know how to write script that sends me computer information to my email add.

Well, then just let us know when you get stuck, and we'll be glad to help you...be sure to post the script you've written, and what error(s) you're getting.

And you asked "how to write a script"?? Well, just open an editor, and start typing. Based on what you're wanting, I'd look at the ifconfig and netstat commands, along with the mail command.

rahilmaknojia 10-28-2009 12:38 PM

Quote:

Originally Posted by TB0ne (Post 3735438)
Well, then just let us know when you get stuck, and we'll be glad to help you...be sure to post the script you've written, and what error(s) you're getting.

And you asked "how to write a script"?? Well, just open an editor, and start typing. Based on what you're wanting, I'd look at the ifconfig and netstat commands, along with the mail command.

okay, I understand but is it possible to create a script that will automatically send information to E-mail address online?

TB0ne 10-28-2009 12:49 PM

Quote:

Originally Posted by rahilmaknojia (Post 3735556)
okay, I understand but is it possible to create a script that will automatically send information to E-mail address online?

Yep, very possible. See my previous post where I mentioned the commands to look up.

ta0kira 10-28-2009 01:23 PM

Quote:

Originally Posted by rahilmaknojia (Post 3735556)
okay, I understand but is it possible to create a script that will automatically send information to E-mail address online?

This depends on a few things, namely if you plan to send it directly from your machine (sendmail/mail/nail) or whether you'll route it through SMTP. For the former, you'll often be blocked by your LAN or ISP from accessing port 25 on remote servers. If you're going through SMTP, you'll have to be set up with an email provider to have such access.
Kevin Barry


All times are GMT -5. The time now is 04:07 AM.