The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ftp from windows to unix using a perl script on unix machine raksha.s Shell Programming and Scripting 3 02-27-2009 12:18 AM
[PERL] Running unix commands within Perl Scripts userix Shell Programming and Scripting 1 05-28-2008 07:06 PM
Changing windows server alias name on windows or unix? NycUnxer UNIX for Dummies Questions & Answers 1 03-26-2008 05:54 PM
sending mail using perl through windows victorvvk Shell Programming and Scripting 13 01-17-2006 05:11 AM
Anyone know any good perl compilers for windows ? JeZzTeR Windows & DOS: Issues & Discussions 3 05-08-2002 04:13 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2009
kenkanya kenkanya is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 18
Perl for Unix & Windows

Hi
Even though this is unix forum, iam posting this thread as iam not sure of which forum should i post this too.
I understand perl can be used in unix environment and i have used the same for automation of my processes.
Eg:
Open a file
search the text string
replace the text string
close the file

Iam looking for similar "perl for windows". Where i can do the same. Iam not sure if this can be done through the batch file though! (Again, because i could not find any information of using or creating batch scripts i could not continue further).
I somehow believe that "perl for windows" can be used for this automation

Open a file
search the text string
replace the text string
close the file
on windows environment.

Where do i get "perl for windows" or is it possible through the batch script or any other freeware?

Do request you to direct me, so that i can automate on windows too, how i did on unix!

thanks
  #2 (permalink)  
Old 07-02-2009
pludi's Avatar
pludi pludi is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,920
If you enter the terms "perl for windows" into a certain popular search engine (which also powers this sites search), the very first result will be that of a company providing the probably most used Perl distribution.

Or go to perl.org -> Downloads, download the source and compile it yourself.
  #3 (permalink)  
Old 07-02-2009
hansini hansini is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 10
Now the Active perl has release version 5.10. I am not sure how extensively you are using the perl libraries in your scripting, still some of the ppm packages are not available for 5.10. For the version 5.8.X you can find pretty much all the ppm packages.
  #4 (permalink)  
Old 07-02-2009
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
For Windows there is activeperl you can get from ActiveState Home and Strawberry perl that you can get from Strawberry Perl. If you neede to run perl scripts automatically on Windows you use the task manager for that.

If you have a new version of Windows I recommend Strawberry perl 5.10, make sure you get the correct version for your OS, XP/Vista/2000 32 bit or 64 bit.
  #5 (permalink)  
Old 07-03-2009
kenkanya kenkanya is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 18
Hi,
Thanks to all you folks (KevinADC, hansini, pludi) for giving me direction.
Iam not using any extensive perl stuff. Only basics or may be small part of perl.(Iam yet to go in for big programs, though!!)

Below is the perl part iam using on unix. I have put these contents in a shell script and running it. This saves my time (by opening in vi, editing, saving).
I plan to use the same on windows too.(Just editing a file contents).

The file contents in the shell script on unix (just the perl part) iam giving below:
perl -pi -e '
s|hubURL=http://PSEMHUB:80/PSEMHUB/hub|hubURL=http://ffasuv.relix.com:7001/PSEMHUB/hub|g;
s|agentport=5283|agentport=9940|g;
s|pinginterval=10000|pinginterval=60000|g;
s|unixdrivestocrawl=/usr/home|unixdrivestocrawl=/u/ds4e/relix|g' config.prop

I shall update how it works on windows after i download and install perl on windows. I hope i will create a batch script and put in these contents and check the same.
  #6 (permalink)  
Old 07-03-2009
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
Change the single-quotes that surround the code to double-quotes when running on Windows.
  #7 (permalink)  
Old 07-06-2009
kenkanya kenkanya is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 18
Thanks KevinDAC.
That's really an information. I shall do the same too when checking.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0