RE: perl script on remote server linux

2008-09-01 Thread Irfan J Sayed (isayed)
Hi, Please suggest. Regards, Irfan. From: Irfan J Sayed (isayed) Sent: Friday, August 29, 2008 1:09 PM To: '[EMAIL PROTECTED]'; Jeff Pang; beginners@perl.org Subject: RE: perl script on remote server linux Thanks. It worked but with one issue. Let say

How to run cgi script

2008-09-01 Thread Irfan J Sayed (isayed)
Hi, I have installed IIS on my machine (to make my machine web server). Now i need to execute / run cgi script on my machine. cgi script is saved in c:\irfan. now how should i run this cgi script in web browser. which webURL i should give. Regards Irfan.

RE: perl script on remote server linux

2008-08-29 Thread Irfan J Sayed (isayed)
PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 8:18 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org; Jeff Pang Subject: RE: perl script on remote server linux Try this: system ssh -x -t SERVER_NAME \sudo /home/irfan.sh/test.sh\ /home/irfan/out.txt ; On the desination

RE: perl script on remote server linux

2008-08-28 Thread Irfan J Sayed (isayed)
To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: RE: perl script on remote server linux system ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh; you need a \ before the @. modify it to: system ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh; Créez votre adresse

RE: perl script on remote server linux

2008-08-28 Thread Irfan J Sayed (isayed)
Yes. I want to parse string error in the log file. Please suggest how should I achieve this. Regards Irfan. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:29 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org; Jeff

RE: perl script on remote server linux

2008-08-27 Thread Irfan J Sayed (isayed)
Hi, In my case, the user with which I am executing the script is not there in sudoers file. So I did in the following manner. #!/usr/bin/perl open FILE, server_list or die $!; while(FILE) { print the host is: $_; chomp; system ssh [EMAIL PROTECTED]

RE: perl script on remote server linux

2008-08-27 Thread Irfan J Sayed (isayed)
Thanks Jeff. It really helped. Just one doubt, if we can perform operation with ssh then why we require Net::SSH module?? Regards Irf. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2008 2:32 PM To: Irfan J Sayed (isayed) Cc: beginners

NET ssh module

2008-08-26 Thread Irfan J Sayed (isayed)
Hi All, I am trying to install Net-ssh module. I am getting error like not able to access FTP site to fetch CPAN files. Please find the attached log. The box where i want to install this module does not have the internet connection. Please sugget. Regards Irf. [EMAIL PROTECTED]

RE: doubt in code

2008-08-22 Thread Irfan J Sayed (isayed)
Hi, Can somebody please help. Regards Irfan. -Original Message- From: Irfan J Sayed (isayed) Sent: Friday, August 22, 2008 11:12 AM To: 'Stewart Anderson'; beginners@perl.org Subject: RE: doubt in code Agree, but where is the file name?? $server will just store the server name right

doubt in code

2008-08-21 Thread Irfan J Sayed (isayed)
Hi All, I have sample code like this: #!/usr/bin/perl # file: lgetr.pl # Figure 1.2: Read the first line from a remote server use IO::Socket; my $server = shift; my $fh = IO::Socket::INET-new($server); my $line = $fh; print $line; As per comment it says that, it prints the first line

RE: doubt in code

2008-08-21 Thread Irfan J Sayed (isayed)
-Original Message- From: Irfan J Sayed (isayed) [mailto:[EMAIL PROTECTED] Sent: 21 August 2008 15:49 To: beginners@perl.org Subject: doubt in code Hi All, I have sample code like this: #!/usr/bin/perl # file: lgetr.pl # Figure 1.2: Read the first line from a remote server use IO

doubt

2008-08-20 Thread Irfan J Sayed (isayed)
Hi All, Can you please tell me what is the value of $file. When i execute this script . it says Can't open : No such file or directory Please suggect. Regards Irf. #!/usr/bin/perl # file: count_lines.pl # Figure 1.4: Count the lines of a file use strict; use IO::File; my $file = shift;

RE: doubt

2008-08-20 Thread Irfan J Sayed (isayed)
Do I need to really give the full pathname of the file and store in the $file. What does this line means my $file = shift; Regards Irf. -Original Message- From: Andrew Curry [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 7:06 PM To: Irfan J Sayed (isayed); beginners

RE: doubt

2008-08-20 Thread Irfan J Sayed (isayed)
Thank you very much. Really helped. Regards Irfan. -Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 7:35 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: doubt On Wed, 2008-08-20 at 19:03 +0530, Irfan J Sayed

RE: Execute the Linux command on remote machine

2008-08-19 Thread Irfan J Sayed (isayed)
the Linux command on remote machine Irfan J Sayed (isayed) schreef: Now I have installed entire Net::SSH::Perl module in the /tmp folder. It looks like you copied in stead of installed. http://www.cpan.org/misc/cpan-faq.html#How_install_Perl_modules -- Affijn, Ruud Gewoon is een tijger

RE: Execute the Linux command on remote machine

2008-08-19 Thread Irfan J Sayed (isayed)
machine Irfan J Sayed (isayed) schreef: I have downloaded the Math::Pari module and was trying to install but stuck Let's go back to the start. 1. Show us the output of `perl -V`. 2. Run perl -MCPAN -e 'install Math::Pari'. -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail

Remote command

2008-08-19 Thread Irfan J Sayed (isayed)
Hi All, Can somebody have the sample Perl script which will fire the ls command on remote linux machine and give the exit status whether it is success or failure. OR can somebody please guide me step by step how to achieve this Please help. Regards Irf.

RE: Execute the Linux command on remote machine

2008-08-18 Thread Irfan J Sayed (isayed)
/perl5/site_perl/5.8.7/i386-linux-thread-multi Do I need to again copy this module also. How long I should keep adding such modules. Please help Regards Irfan. -Original Message- From: Irfan J Sayed (isayed) Sent: Thursday, August 14, 2008 6:25 PM To: 'Rob Dixon'; Perl Beginners Subject

RE: Execute the Linux command on remote machine

2008-08-14 Thread Irfan J Sayed (isayed)
command on remote machine Irfan J Sayed (isayed) wrote: Thanks for reply. I have Perl.pm installed in following path [EMAIL PROTECTED] scripts]$ ls -l /tmp/Net/SSH/ total 32 -rwxr--r-- 1 cgadgil cgadgil 32724 Aug 13 06:42 Perl.pm [EMAIL PROTECTED] scripts]$ And perl script I modified

Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
Hi All, I want to execute one command on remote Linux machine. Following is the perl code. #! /usr/bin/perl; # perl module to parse the Install.log file for errors use lib /tmp/; use Net::SSH::Perl; my $ssh = Net::SSH::Perl-new(avm-qa-cam2.net.com); $ssh-login(cgadgil, cgadgil);

RE: Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
, $stderr, $exit) = $ssh-cmd(ls); Please help. Regards Irfan. -Original Message- From: Sandeep Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 3:27 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: Execute the Linux command on remote machine Irfan J Sayed

RE: Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
. From: Sandeep Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 5:39 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: Execute the Linux command on remote machine Irfan J Sayed (isayed) wrote: Still the error is same. Following

RE: Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
, 2008 6:36 PM To: Perl Beginners Cc: Irfan J Sayed (isayed) Subject: Re: Execute the Linux command on remote machine Irfan J Sayed (isayed) wrote: I want to execute one command on remote Linux machine. Following is the perl code. #! /usr/bin/perl; # perl module to parse

searching word in script

2006-06-02 Thread Irfan J Sayed
Hi All, I am using following code #!/usr/local/bin/perl # Main program use warnings; use strict; use File::Find; my $file = 'c:\\backup.pl'; open (FH, $file); my ($line); my $word = pop; while ($line = FH) { if ($line =~/$word/) { print match found; } else {

searching word in script

2006-06-02 Thread Irfan J Sayed
Hi All, I am using following code #!/usr/local/bin/perl # Main program use warnings; use strict; use File::Find; my $file = 'c:\\backup.pl'; open (FH, $file); my ($line); my $word = pop; while ($line = FH) { if ($line =~/$word/) { print match found; } else {

RE: searching word in script

2006-06-02 Thread Irfan J Sayed
Hi All, I modified the code as per suggession but still error #!/usr/local/bin/perl # Main program use warnings; use strict; use File::Find; my $file = c:\\irfan\\cqcmd.txt; open (FH, $file) | die file can't open $! \n; my ($line); while ($line = FH) { if ($line =~m/foo/)

RE: searching word in script

2006-06-02 Thread Irfan J Sayed
great it's working fine thanks Regards Irfan Sayed [EMAIL PROTECTED] 06/02/2006 05:24 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc Subject RE: searching word in script Use '||' instead of '|'. -Original Message- From: Irfan J Sayed [mailto:[EMAIL PROTECTED] Sent

help in regular expression

2006-06-01 Thread Irfan J Sayed
Hi , I am using following code #!/usr/local/bin/perl # Main program use warnings; use strict; my $file = c:\backup.pl; open(FH,$file) || die can't open a file; my $pattern = '\w\s\w'; my $input = ; print yes got the match if $input =~ /$pattern/; but i am getting following error

perl help

2006-04-18 Thread Irfan J Sayed
Hi, I am executing following command my $cp = dircopy(D:\\vobs,D:\\backup); if ($cp == 0) { print Copied successfuly\n; } else { print Copying failed\n; } But in variable $cp proper value is not coming .Either it should come as 0 or1 but it's coming as any junk value or no. can

Split function help

2006-04-17 Thread Irfan J Sayed
Hi, I have a following line/statement stored in variable $test deliver.Admin_Irfan_Project.20060413.212355 i want to split this line in . and store in array. I am using following code my @name = Split(/./, $test); but i am getting following error Use of uninitialized value in pattern match

split function in perl

2006-04-17 Thread Irfan J Sayed
Hi, I have a following line stored in one variable $test. deliver.Admin_Irfan_Project.20060413.212355 . I need to split this line into the words and store the output in array. words should like this. deliver admin irfan project 20060413 212355 I am using following code to split this line

redirecting array to file

2006-04-17 Thread Irfan J Sayed
Hi, Can anybody please tell me how to redirect / write the contents of array to the file Regards Irfan Sayed

Catching the output in file

2006-04-17 Thread Irfan J Sayed
Hi, I am executing following command foreach $_ (@vob_list) { system cleartool lock vob:$_; } I want to catch the output of this system command in the file can anybody please tell me that how can i achieve that Regards Irfan Sayed

Split function

2006-04-16 Thread Irfan J Sayed
Hi, To run/use Split function in the perl script , is it necessary to include/add any perl module ? Plz let me know. Regards Irfan Sayed

array

2006-04-13 Thread Irfan J Sayed
Hi All, I need to store the output of command in one array. the output of that command is generally 5 to 6 lines . i wanted to store each line in the array how can i achieve that . Regards Irfan Sayed

array help

2006-04-13 Thread Irfan J Sayed
Hi, I am executing following command. my @activity = system cleartool lsactivity -short -view Admin_Irfan_Project_int; but the output of this command is not storing in the array. array is empty. plz help Regards Irfan Sayed

date and time in perl

2006-04-10 Thread Irfan J Sayed
Hi All, How to get date and time in perl ? is there any function for that ? Regards Irfan Sayed

Re: date and time in perl

2006-04-10 Thread Irfan J Sayed
Hi, Can you tell me exact command / syntax as i struggled lot but didn't succeed so that i can store date,time in some variable. plz let me know. Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 04/10/2006 03:38 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject

Re: date and time in perl

2006-04-10 Thread Irfan J Sayed
Thanks Jelf Regards Irfan Sayed Jeff Pang [EMAIL PROTECTED] 04/10/2006 06:11 PM Please respond to Jeff Pang [EMAIL PROTECTED] To beginners@perl.org cc Subject Re: date and time in perl Hi, Can you tell me exact command / syntax as i struggled lot but didn't succeed so that i

executing/calling another perl script

2006-04-09 Thread Irfan J Sayed
Hi All, I need to call/execute another perl file from my backup.pl perl script by giving some argument. Can anybody please tell me how to do that? Regards Irfan Sayed

RE: executing/calling another perl script

2006-04-09 Thread Irfan J Sayed
Thanks for all your help. Regards Irfan Sayed

RE: perl help : escape character

2006-04-06 Thread Irfan J Sayed
Thanks raymond . it's working now. Regards Irfan Sayed Raymond Raj [EMAIL PROTECTED] 04/06/2006 11:23 AM Please respond to [EMAIL PROTECTED] To Irfan J Sayed/India/[EMAIL PROTECTED], beginners@perl.org cc Subject RE: perl help : escape character -Original Message- From

perl help

2006-04-06 Thread Irfan J Sayed
Hi all, I am running following clearcase command in perl my @vob_list = `cleartool lsvob -short c:\\vob_list.txt`; I am getting output in c:\vob_list.txt file but not in the @vob_list array can anybody plz help me out in this regard Regards Irfan Sayed

windows command help

2006-04-06 Thread Irfan J Sayed
Hi All, I need to run the windows copy command from command prompt to copy several folders and files in specific folder to another folder I am running following command C:\Documents and Settings\Administratorcopy D:\vobs d: D:\vobs\* The system cannot find the file specified. 0 file(s)

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Thanks Chas, That is what i was looking for. Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 04/06/2006 10:38 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: windows command help On 4/6/06, Irfan J Sayed [EMAIL PROTECTED] wrote: Hi All, I need

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Hi, I tried the option given by you but it's throwing following error. Undefined subroutine main::syscopy called at C:\irfan\backup.pl line 20 I did following thing use file::Xcopy; syscopy(D:\\vobs,D:\\backup); Any sol. on this plz? Regards Irfan Sayed Irfan J Sayed/India/[EMAIL

Re: windows command help

2006-04-06 Thread Irfan J Sayed
Hi Chas, I corrected. but still same error. I put as use File::Xcopy; Any other sol. plz Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 04/07/2006 10:02 AM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: windows command help On 4/7/06, Irfan J Sayed

Re: windows command help

2006-04-06 Thread Irfan J Sayed
: On 4/6/06, Irfan J Sayed [EMAIL PROTECTED] wrote: Hi All, I need to run the windows copy command from command prompt to copy several folders and files in specific folder to another folder I am running following command C:\Documents and Settings\Administratorcopy D:\vobs d: D:\vobs

zip command in perl

2006-04-06 Thread Irfan J Sayed
Hi, I need to zip my backup dir. so that it will automatically convert my backup dir to backup.zip file can it be happen through perl ? Any sol. on this? Regards Irfan Sayed

Re: zip command in perl

2006-04-06 Thread Irfan J Sayed
/07/2006 10:56 AM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: zip command in perl On 4/7/06, Irfan J Sayed [EMAIL PROTECTED] wrote: Hi, I need to zip my backup dir. so that it will automatically convert my backup dir to backup.zip file can it be happen

Perl help

2006-04-05 Thread Irfan J Sayed
Hi, I have printed one statement in perl . now i want to print another statement on second line . i just wanted to know that what is the syntax in perl to go to the next line ? Plz let me know. Regards Irfan Sayed

Re: %Re: Perl help

2006-04-05 Thread Irfan J Sayed
Thanks david. Regards Irfan Sayed David Gama Rodrí­guez [EMAIL PROTECTED] 04/05/2006 10:37 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject %Re: Perl help Irfan J Sayed wrote: Hi, I have printed one statement in perl . now i want to print another

Re: Perl help

2006-04-05 Thread Irfan J Sayed
Thanks Chas Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 04/05/2006 10:53 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: Perl help On 4/5/06, Irfan J Sayed [EMAIL PROTECTED] wrote: Hi, I have printed one statement in perl . now i want to print

perl help : escape character

2006-04-05 Thread Irfan J Sayed
Hi All, I am running following clearcase command my @activity = `$CT lsactivity -short -invob \Irfan_Test`; where \Irfan_Test is the vob tag but it is giving me following error. Unrecognized escape \I passed through at C:\irfan\TESTSE~1.PL line 31. The system cannot find the path specified.

perl script help

2006-04-04 Thread Irfan J Sayed
Hi All, I have written a script to send a mail but when i am running that script i am getting following error. Can't locate Mail/Sendmail.pm in @INC (@INC contains: C:\irfan\ C:/perl/lib C:/p erl/site/lib .) at C:\irfan\DELIVE~2.PL line 30. BEGIN failed--compilation aborted at

how to define variable in perl

2006-03-23 Thread Irfan J Sayed
Hi, Plz let me know how to define variable in perl Regards Irfan Sayed

perl code help

2006-03-23 Thread Irfan J Sayed
Hi All, I have written simple script in perl to get the user login name Following is the script $sessionobj = $entity-GetSession(); $username = $session-GetUserLoginName(); $entity-SetFieldValue(submitter_id, $username); But when i am running my cq application this hook is not executing and i

Re: perl code help

2006-03-23 Thread Irfan J Sayed
Hi Chas, This is the only program i am using. Plz tell me what i am doing wrong. Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 03/23/2006 10:29 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: perl code help On 3/23/06, Irfan J Sayed [EMAIL

Re: perl code help

2006-03-23 Thread Irfan J Sayed
what all modules needs to be added to run this script. plz help me. Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 03/23/2006 10:53 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: perl code help On 3/23/06, Irfan J Sayed [EMAIL PROTECTED] wrote: Hi

Perl Help

2006-03-21 Thread Irfan J Sayed
Hi All, I have written following perl code use CQPerlExt; use Prima; use Prima::Application; use Prima::MsgBox; $sessionobj = $entity-GetSession(); $username = $session-GetUserLoginName(); Prima::MsgBox::message( You have entered: '$username', mb::Ok); but when i compile

Re: msgbox in perl script

2006-03-07 Thread Irfan J Sayed
this ? Regards Irfan Sayed Rob Coops [EMAIL PROTECTED] 03/07/2006 04:26 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: msgbox in perl script Hi Irfan, Could you be a little more specific. What do you have and what are you trying to do? Even though msgbox

Re: msgbox in perl script

2006-03-07 Thread Irfan J Sayed
Hi, Is ther any function in perl to compare the dates ? if yes then what is the syntax Regards Irfan Sayed Octavian Rasnita [EMAIL PROTECTED] 03/07/2006 04:53 PM To Rob Coops [EMAIL PROTECTED], Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: msgbox in perl script

tar command

2006-02-24 Thread Irfan J Sayed
Hi All, I need to execute unix tar command thru perl file can somebody helps me out in this regard Regards Irfan Sayed

Re: tar command

2006-02-24 Thread Irfan J Sayed
(gzip vobstg.tar); # start the clearacse `$cc start`; # unLock the every vob foreach $vob_tag (@vob_list) { `$CT unlock vob:$vob_tag`; } Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 02/24/2006 09:22 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org

Re: tar command

2006-02-24 Thread Irfan J Sayed
. Regards Irfan Sayed Chas Owens [EMAIL PROTECTED] 02/24/2006 11:19 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: tar command On 2/24/06, Irfan J Sayed [EMAIL PROTECTED] wrote: Hi All, Thanks for mail I am using following script for backup of clearcase