LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2005, 08:46 AM   #1
anirudh
Member
 
Registered: Aug 2004
Location: bangalore india
Posts: 50

Rep: Reputation: 15
Question runing perl unix script in windows 2000


here is a script which runs in unix
i want this script to run in windows what changes i need to do to this to make it work
also where can i get a perl interpretor for windows 2000 to be installed

#!/usr/local/bin/perl
# Description: 5-min load average.
# Sample User Defined Event monitoring script.
$ENV{PATH} = "/bin:/usr/bin:/usr/sbin";
$DATA = `uptime`;
$DATA =~ /average:\s+([\.\d]+),\s+([\.\d]+),\s+([\.\d]+)\s*$/;
if (defined $2) {
print "em_result=$2\n";
} else {
die "Error collecting data\n";
}

i understand i need to change the #! to my perl lib in windows

what about the $ENV{PATH} what changes i need to make
 
Old 04-15-2005, 08:55 AM   #2
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Rep: Reputation: 35
heh.
1. Delete that script.

2. Rewrite the whole thing.

http://www.cpan.org/
 
Old 04-15-2005, 09:06 AM   #3
anirudh
Member
 
Registered: Aug 2004
Location: bangalore india
Posts: 50

Original Poster
Rep: Reputation: 15
as i am not aware of perl and i need to do this really soon can some one help me with a bat file that does the same thing this perl is doing
 
Old 04-15-2005, 10:07 AM   #4
anirudh
Member
 
Registered: Aug 2004
Location: bangalore india
Posts: 50

Original Poster
Rep: Reputation: 15
one thing this script does is that it monitors the 5-minute load average on the
system using the unix command uptime
its equvivalent command in windows in net
can some one help with this
 
  


Reply



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
telnet windows m/c from unix shell script ann124 Programming 1 11-10-2004 01:26 PM
unix korn shell script that interact with windows java program ann124 Programming 5 11-09-2004 09:14 PM
Perl script for statisting/logging windows clients gottin Linux - Networking 2 08-01-2004 05:27 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
runing shell script khucinx Programming 1 05-11-2004 11:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:12 PM.

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