Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 12:20:33 + Bob McConnell wrote: > My first step would be to log into the problem machine as the same > user the command runs under, then try to run it manually. The error > messages there should point you toward the problem. If it runs, then > there has to be a difference i

RE: system command not working in different versions

2012-08-09 Thread Bob McConnell
> From: Shawn H Corey > > On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) > venki neeli wrote: > > > What may be the problem? is it with version of perl? or perl module > > problem? > > It may be a difference in the shell. When there are metacharacters > present, system uses sh(1) to interpret them. Tr

Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) venki neeli wrote: > What may be the problem? is it with version of perl? or perl module > problem? It may be a difference in the shell. When there are metacharacters present, system uses sh(1) to interpret them. Try this on your machines to see if they're

Re: system command not working in different versions

2012-08-09 Thread Paul Anderson
> > From: midhun > To: Hal Wigoda > Cc: venki neeli ; perl list > Sent: Thursday, 9 August 2012 12:01 PM > Subject: Re: system command not working in different versions > > Neeli, Hal is right. Try $which perl from your shell. The location

Re: system command not working in different versions

2012-08-09 Thread venki neeli
roblem? is it with version of perl? or perl module problem? Regards, Neeli From: midhun To: Hal Wigoda Cc: venki neeli ; perl list Sent: Thursday, 9 August 2012 12:01 PM Subject: Re: system command not working in different versions Neeli, Hal is right.

Re: system command not working in different versions

2012-08-08 Thread midhun
> > > > > From: midhun > > To: venki neeli > > Cc: perl list > > Sent: Wednesday, 8 August 2012 3:55 PM > > Subject: Re: system command not working in different versions > > > > One suggestion. Did you compare

Re: system command not working in different versions

2012-08-08 Thread Hal Wigoda
ow.pl) are in same location. > > Regards, > Neeli > > > > From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did

Re: system command not working in different versions

2012-08-08 Thread Owen
> From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did you compare the shebang line of your submit_now.pl > and > your perl executable loca

Re: system command not working in different versions

2012-08-08 Thread venki neeli
August 2012 3:55 PM Subject: Re: system command not working in different versions One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli

Re: system command not working in different versions

2012-08-08 Thread Shawn H Corey
On Wed, 8 Aug 2012 15:55:34 +0530 midhun wrote: > One suggestion. Did you compare the shebang line of your > submit_now.pl and your perl executable location in the 2nd machine > where it is not working. > > Regards, > Midhun > > On Wed, Aug 8, 2012 at 11:48 AM, venki neeli > wrote: > > > Dear

Re: system command not working in different versions

2012-08-08 Thread midhun
One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli wrote: > Dear Friends, > > I am developing a script in which I need to call another pe

Re: system command not working in different versions

2012-08-07 Thread Jeff Pang
You might want to tell us what's the output for error. Some reasons include the file path, the permissions etc. I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./submit_now.pl $xx

system command not working in different versions

2012-08-07 Thread venki neeli
Dear Friends, I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./submit_now.pl $"); can you please, tell me what is the reason? and as well solution. Regards, Neeli

RE: system command question

2011-09-28 Thread Ken Slater
> -Original Message- > From: Amish Rughoonundon [mailto:amishrughoonun...@gmail.com] > Sent: Tuesday, September 27, 2011 4:44 PM > To: beginners@perl.org > Subject: system command question > > Hi, > I am trying to run a make file from perl. For the make file to

system command question

2011-09-28 Thread Amish Rughoonundon
do this in perl using a system call but it failed system("SET A_DIR=C:\\TOOLS\\TMS320 & SET C_DIR=C:\\TOOLS\\TMS320 & PATH=\%PATH\%;C:\\TOOLS;C:\\TOOLS\\TMS320 & make > compilation_output.txt"); Any idea why the system command is not setting the path and A_DIR and C_DIR

Re: redirect system command STDER

2011-07-20 Thread C.DeRykus
On Jul 20, 12:45 am, walde.christ...@googlemail.com ("Christian Walde") wrote: > On Tue, 19 Jul 2011 21:14:10 +0200, Tessio Fechine wrote: > > Hello, > > I have a subroutine that uses useradd to create accounts > > > -- > > @cmd = ('useradd', '-m', $account); > > my $result = system @cmd; > > -- >

Fw: redirect system command STDER

2011-07-20 Thread Shlomi Fish
2911BD47; Wed, 20 Jul 2011 12:42:45 +0300 (IDT) Date: Wed, 20 Jul 2011 12:42:45 +0300 From: Shlomi Fish To: Jim Gibson Cc: Subject: Re: redirect system command STDER Message-ID: <20110720124245.0192b...@telaviv1.shlomifish.org> In-Reply-To: References: X-Mailer: Claws M

Re: redirect system command STDER

2011-07-20 Thread Shlomi Fish
Hi Jim, On Tue, 19 Jul 2011 16:22:14 -0700 Jim Gibson wrote: > On 7/19/11 Tue Jul 19, 2011 12:14 PM, "Tessio Fechine" > scribbled: > > > Hello, > > I have a subroutine that uses useradd to create accounts > > > > -- > > @cmd = ('useradd', '-m', $account); > > my $result = system @cmd; > > -

Re: redirect system command STDER

2011-07-20 Thread Kevin Spencer
On Tue, Jul 19, 2011 at 12:14 PM, Tessio Fechine wrote: > Hello, > I have a subroutine that uses useradd to create accounts > > -- > @cmd = ('useradd', '-m', $account); > my $result = system @cmd; > -- > > but when useradd fails, I need to stop it from sending the error message to > STDER. > Is it

Re: redirect system command STDER

2011-07-20 Thread Christian Walde
On Tue, 19 Jul 2011 21:14:10 +0200, Tessio Fechine wrote: Hello, I have a subroutine that uses useradd to create accounts -- @cmd = ('useradd', '-m', $account); my $result = system @cmd; -- but when useradd fails, I need to stop it from sending the error message to STDER. Is it possible with

Re: redirect system command STDER

2011-07-19 Thread Jim Gibson
On 7/19/11 Tue Jul 19, 2011 12:14 PM, "Tessio Fechine" scribbled: > Hello, > I have a subroutine that uses useradd to create accounts > > -- > @cmd = ('useradd', '-m', $account); > my $result = system @cmd; > -- > > but when useradd fails, I need to stop it from sending the error message to >

redirect system command STDER

2011-07-19 Thread Tessio Fechine
Hello, I have a subroutine that uses useradd to create accounts -- @cmd = ('useradd', '-m', $account); my $result = system @cmd; -- but when useradd fails, I need to stop it from sending the error message to STDER. Is it possible with system? Thanks!

Re: format output from system command

2011-04-16 Thread Peter Scott
On Fri, 15 Apr 2011 08:53:12 -0700, sono-io wrote: > On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote: > >>> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; >>> >>> Is that O.K.? >> >> You are still using a bareword filehandle. > > Putting single quotes around t

Re: format output from system command

2011-04-15 Thread Shawn H Corey
On 11-04-15 11:22 AM, sono...@fannullone.us wrote: open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; Is that O.K.? The problem with not using lexical-scoped file handles is that if a module opens a file using the same name, it closes yours. It's best if you limit the

Re: format output from system command

2011-04-15 Thread sono-io
On Apr 15, 2011, at 8:37 AM, Alan Haggai Alavi wrote: >> open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; >> >> Is that O.K.? > > You are still using a bareword filehandle. Putting single quotes around the filehandle allows it to pass Perl Critic, so I was just cu

Re: format output from system command

2011-04-15 Thread Alan Haggai Alavi
Hello Marc, What about writing it like this: open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \n"; Is that O.K.? You are still using a bareword filehandle. Regards, Alan Haggai Alavi. -- The difference makes the difference -- To unsubscribe, e-mail: beginners-un

Re: format output from system command

2011-04-15 Thread sono-io
On Apr 15, 2011, at 2:11 AM, Shlomi Fish wrote: > 1. Don't use bareword file-handles. > > 2. Use the three-args open: > > open (my $file_our, '>>', 'cmdout') or die "Cannot open cmdout: $!"; What about writing it like this: open ('FILEOUT', '>>', 'cmdout') ||die "cant open cmdout: $! \

Re: format output from system command

2011-04-15 Thread Shlomi Fish
Hi jet speed, On Friday 15 Apr 2011 00:23:17 jet speed wrote: > Hi, > > I need help in formatting ouput from system command, i could'nt figure out > a way to format output from system command. appreciate your help with > this, the details are below. > > hlis3 is

format output from system command

2011-04-14 Thread jet speed
Hi, I need help in formatting ouput from system command, i could'nt figure out a way to format output from system command. appreciate your help with this, the details are below. hlis3 is file with list of clients hosta hostb hostc hostd The below program looks through each client and ou

format output from system command

2011-04-14 Thread jet speed
Hi, I need help in formatting ouput from system command, i could'nt figure out a way to format output from system command. appreciate your help with this, the details are below. hlis3 is file with list of clients hosta hostb hostc hostd The below program looks through each client and ou

Re: system command

2008-11-26 Thread Sharan Basappa
> Or you might want to use threads, though they are certainly not the same > both have their advantages and you might want to read up on them before > making a decission on which to use. > > In any case I would advise you to first, use which ever way of modeling you > prefer, to draw out the way th

Re: system command

2008-11-26 Thread Deviloper
r semaphores, heaps and queues. Bye, B.   Sharan Basappa <[EMAIL PROTECTED]> hat am 26. November 2008 um 16:13 geschrieben: > Hi, > > I am trying to launch a program using system command. > The program usually takes 20-30 minutes to complete. > I launch the programs i

Re: system command

2008-11-26 Thread Rob Coops
On Wed, Nov 26, 2008 at 4:21 PM, Jeff Pang <[EMAIL PROTECTED]> wrote: > > Message du 26/11/08 16:13 > > De : "Sharan Basappa" > > A : "Perl Beginners" > > Copie à : > > Objet : system command > > > > > > Hi, > > &

Re: system command

2008-11-26 Thread Mr. Shawn H. Corey
On Wed, 2008-11-26 at 20:43 +0530, Sharan Basappa wrote: > Hi, > > I am trying to launch a program using system command. > The program usually takes 20-30 minutes to complete. > I launch the programs in a loop. > Will the system command wait for first program to complete and the

system command

2008-11-26 Thread Sharan Basappa
Hi, I am trying to launch a program using system command. The program usually takes 20-30 minutes to complete. I launch the programs in a loop. Will the system command wait for first program to complete and then proceed to the next one. What if I want to launch these programs in parallel which is

Re: how to redirect in system command two devices at once

2008-09-22 Thread air
On 9月20日, 上午4时14分, [EMAIL PROTECTED] (Back9) wrote: > Hello, > > I am calling system() to run a devenv.exe to build vs 2005 solution > file. > My problem is I want to capture the output while building the solution > to a file and show the output to monitor at once. > > Is there a way or a module to

Re: how to redirect in system command two devices at once

2008-09-22 Thread Sharad Ganapathy
Back9 wrote: Hello, I am calling system() to run a devenv.exe to build vs 2005 solution file. My problem is I want to capture the output while building the solution to a file and show the output to monitor at once. Is there a way or a module to achieve that goal? TIA See the command 'tee'

Re: how to redirect in system command two devices at once

2008-09-21 Thread Mr. Shawn H. Corey
On Fri, 2008-09-19 at 13:14 -0700, Back9 wrote: > Hello, > > I am calling system() to run a devenv.exe to build vs 2005 solution > file. > My problem is I want to capture the output while building the solution > to a file and show the output to monitor at once. > > Is there a way or a module to a

how to redirect in system command two devices at once

2008-09-21 Thread Back9
Hello, I am calling system() to run a devenv.exe to build vs 2005 solution file. My problem is I want to capture the output while building the solution to a file and show the output to monitor at once. Is there a way or a module to achieve that goal? TIA -- To unsubscribe, e-mail: [EMAIL PROT

Re: can't run mailx as PERL system command

2007-11-28 Thread Jenda Krynicky
From: Elliot Holden <[EMAIL PROTECTED]> > ok this is problem going to be real easy for one of you PERL gurus but It's either Perl (the language) or perl (the interpreter), there is no such thing as PERL. > my little brain just can't figure it out. From the command line (Solaris > 9) I can do

Re: error on simple system command

2007-11-27 Thread Tom Phoenix
On 11/27/07, lerameur <[EMAIL PROTECTED]> wrote: > works good now: > my $file_to_print = ( `ls -1c /test/*log | tail -1 `); > > print "file_to_print: $file_to_print"; Since you didn't chomp() it, and since you didn't need to add a newline when you printed it, it seems that $file_

Re: error on simple system command

2007-11-27 Thread John W . Krahn
On Tuesday 27 November 2007 08:18, lerameur wrote: > > works good now: > my $file_to_print = ( `ls -1c /test/*log | tail -1 `); > > print "file_to_print: $file_to_print"; > > open (FILE, "< /test/$file_to_print") or die "Could not open > file_to_print $: $!"; > > although the thi

Re: error on simple system command

2007-11-27 Thread lerameur
works good now: my $file_to_print = ( `ls -1c /test/*log | tail -1 `); print "file_to_print: $file_to_print"; open (FILE, "< /test/$file_to_print") or die "Could not open file_to_print $: $!"; although the third line is not opening the file. It prints out good but but I

Re: can't run mailx as PERL system command

2007-11-27 Thread Celejar
On Tue, 27 Nov 2007 19:43:55 -0500 Elliot Holden <[EMAIL PROTECTED]> wrote: > But in PERL the below code does not work: > > system("echo my little test | mailx -s \"Test Message\" > [EMAIL PROTECTED]"); > > even if I just do: > > system("mailx [EMAIL PROTECTED]"); You need to escape the '@' i

Re: can't run mailx as PERL system command

2007-11-27 Thread Tom Phoenix
On 11/27/07, Elliot Holden <[EMAIL PROTECTED]> wrote: > system("echo my little test | mailx -s \"Test Message\" > [EMAIL PROTECTED]"); What is that command? This code should show it to you: print "The command is: echo my little test | "; print "mailx -s \"Test Message\" "; print "[EMAIL PR

can't run mailx as PERL system command

2007-11-27 Thread Elliot Holden
s from PERL perfectly fine. Also I know that many of you gurus might suggest I do it a different way because of security issues or what not but I would really like to find out why this particular system command is not working from PERL. Sincerely Elliot -- To unsubscribe, e-mail: [EMAIL PROTE

Re: error on simple system command

2007-11-26 Thread Jenda Krynicky
To: beginners@perl.org From: lerameur <[EMAIL PROTECTED]> Subject:error on simple system command Date sent: Mon, 26 Nov 2007 13:05:53 -0800 (PST) Organization: http://groups.google.com > Hello, > > I a

Re: error on simple system command

2007-11-26 Thread John W . Krahn
On Monday 26 November 2007 13:05, lerameur wrote: > Hello, Hello, > I am trying to use this two line script. The command by itself works, > when I run this script, I get error message: > Use of uninitialized value in concatenation (.) or string at ./ > find_date.pl line 8. > > line 8: my $file_t

error on simple system command

2007-11-26 Thread lerameur
Hello, I am trying to use this two line script. The command by itself works, when I run this script, I get error message: Use of uninitialized value in concatenation (.) or string at ./ find_date.pl line 8. line 8: my $file_to_print = system "ls -lrt /test/*log | tail -1 | awk {'print $9'}";

Re: call system command

2007-05-15 Thread Chas Owens
On 5/15/07, Dr.Ruud <[EMAIL PROTECTED]> wrote: snip AFAIK, it is not that "Perl automagically uses the right directory separator", but that the shell at hand understands both ways. How does it work with MacOS9? snip I could have sworn that it was, but I just checked perldoc perlport and my memo

Re: call system command

2007-05-15 Thread Dr.Ruud
"Chas Owens" schreef: > Tatiana Lloret Iglesias: >> my $status = system("d:\\blast\\bin\\blastall -p blastn -i $file -d >> $patDB -o $workdir\\blast_$blast_file_id.txt"); > snip > > Just an unrelated note to make your life a little easier, Perl > automagically uses the right directory separator if

Re: call system command

2007-05-14 Thread Chas Owens
On 5/14/07, Tatiana Lloret Iglesias <[EMAIL PROTECTED]> wrote: snip my $status = system("d:\\blast\\bin\\blastall -p blastn -i $file -d $patDB -o $workdir\\blast_$blast_file_id.txt"); snip Just an unrelated note to make your life a little easier, Perl automagically uses the right directory sepa

Re: call system command

2007-05-14 Thread Xavier Noria
On May 14, 2007, at 3:52 PM, Tatiana Lloret Iglesias wrote: Thank a lot! Another related question,,, system command can be used also for linux? Sure. Of course it is unlikely that the arguments themselvels are portable in practice, I mean blastall won't probably be located at "d

Re: call system command

2007-05-14 Thread Tatiana Lloret Iglesias
Thank a lot! Another related question,,, system command can be used also for linux? Regards T On 5/14/07, Xavier Noria <[EMAIL PROTECTED]> wrote: On May 14, 2007, at 3:44 PM, Tatiana Lloret Iglesias wrote: > Hi all, > > I have to execute this command from perl: > > m

Re: call system command

2007-05-14 Thread Xavier Noria
On May 14, 2007, at 3:44 PM, Tatiana Lloret Iglesias wrote: Hi all, I have to execute this command from perl: my $status = system("d:\\blast\\bin\\blastall -p blastn -i $file -d $patDB -o $workdir\\blast_$blast_file_id.txt"); but the problem is that $workdir contains spaces how can I

call system command

2007-05-14 Thread Tatiana Lloret Iglesias
Hi all, I have to execute this command from perl: my $status = system("d:\\blast\\bin\\blastall -p blastn -i $file -d $patDB -o $workdir\\blast_$blast_file_id.txt"); but the problem is that $workdir contains spaces how can I make it work? Thanks! Regards T

Re: run system command in the background using CGI

2007-04-05 Thread Tom Phoenix
On 4/4/07, Brian Volk <[EMAIL PROTECTED]> wrote: I would like to thank you page to be displayed instantly while the download continues to run in the background; kind of like the '&' does at the end of a bash command. Is this possible? Sure; but there are some aspects to be aware of. Generally

Re: run system command in the background using CGI

2007-04-04 Thread Jeff Pang
e >displayed instantly while the download continues to run in the >background; kind of like the '&' does at the end of a bash command. Is >this possible? > Hello, If I'm you,I'll try both of the two ways. 1) Fork a child process and call "exec" to execute

run system command in the background using CGI

2007-04-04 Thread Brian Volk
displayed instantly while the download continues to run in the background; kind of like the '&' does at the end of a bash command. Is this possible? I thought for sure if I used a print "Location: $search_results\n\n"; and then used the system command to launch the download sc

Re: [PBML] system() command with a time limit

2006-12-24 Thread Randal L. Schwartz
> "Kelly" == Kelly Jones <[EMAIL PROTECTED]> writes: Kelly> I want to use system() (or `command`) to run an external command from Kelly> my Perl script. However, if the external command takes more than 30 Kelly> seconds (for example) to run, I want to kill it, and move on with the Kelly> rest

Re: system() command with a time limit

2006-12-24 Thread Jeff Pang
Jones <[EMAIL PROTECTED]> >Sent: Dec 25, 2006 9:45 AM >To: beginners@perl.org, [EMAIL PROTECTED] >Subject: system() command with a time limit > >I want to use system() (or `command`) to run an external command from >my Perl script. However, if the external command takes more tha

system() command with a time limit

2006-12-24 Thread Kelly Jones
I want to use system() (or `command`) to run an external command from my Perl script. However, if the external command takes more than 30 seconds (for example) to run, I want to kill it, and move on with the rest of my Perl script. How do I do this? -- We're just a Bunch Of Regular Guys, a collec

Re: How to emulate this set or how to assign the result of running system "command" to a variable

2006-08-13 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > Hi John, Hello, > Thanks as usual ... what is UUOC? http://www.justfuckinggoogleit.com/search?query=UUOC > Am getting more intrigue and confused with your short-cuts coding > but it is fun though ... > > These two lines here, are you creating a hash? No.

Re: How to emulate this set or how to assign the result of running system "command" to a variable

2006-08-13 Thread Ken Foskey
On Mon, 2006-08-14 at 09:13 +1200, [EMAIL PROTECTED] wrote: > have num_of_developers=`cat /etc/passwd | grep developer | wc -l` which gives > the number of developer logins. So how do I get it to do the same in Perl? I untested... you get to debug it. use strict; my $passwd; my $line; my $num_

Re: How to emulate this set or how to assign the result of running system "command" to a variable

2006-08-13 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > Hi John, Hello, > Thanks for your prompt response as usual ... > > Not exactly need File::Spec and File::Basename per se, I really need to > grab some of the environment variables that are set when the Perl script > is run or in the case of the .BAT file, when the batc

Re: How to emulate this set or how to assign the result of running system "command" to a variable

2006-08-13 Thread benbart
Hi John, Thanks for your prompt response as usual ... Not exactly need File::Spec and File::Basename per se, I really need to grab some of the environment variables that are set when the Perl script is run or in the case of the .BAT file, when the batch file is run. For example, I want to know w

Re: How to emulate this set or how to assign the result of running system "command" to a variable

2006-08-13 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > Hi all, Hello, > I currently have a MS-DOS batch file that am trying to convert to a Perl > script. > I have something like this in the .BAT file where variables are "set" based on > some parsing of a variable passed as a command line argument whenever the .BAT > file

How to emulate this set or how to assign the result of running system "command" to a variable

2006-08-13 Thread benbart
Hi all, I currently have a MS-DOS batch file that am trying to convert to a Perl script. I have something like this in the .BAT file where variables are "set" based on some parsing of a variable passed as a command line argument whenever the .BAT file is executed by the application. The command l

Running system command or batch file using system "[command]"

2006-08-12 Thread benbart
running OS commands or BATCH files besides the system command. Thanks ... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Execute newgrp system command

2005-11-21 Thread Suvajit Sengupta
/required variables from the current shell. After the newgrp system command from a perl script could not satisfy my need I tried including the command in a separate .cshrc file and then just sourcing that file from a perl script. But this job could not again be executed from perl script . The perl

Re: Execute newgrp system command

2005-11-21 Thread Jay Savage
On 11/21/05, Shawn Corey <[EMAIL PROTECTED]> wrote: > Suvajit Sengupta wrote: > > Hi, > > I want to login into a new group using 'newgrp' UNIX command.Every > > newgrp command invokes a new shell. > > But when I am trying to execute this system c

Re: Execute newgrp system command

2005-11-21 Thread Shawn Corey
Suvajit Sengupta wrote: Hi, I want to login into a new group using 'newgrp' UNIX command.Every newgrp command invokes a new shell. But when I am trying to execute this system command from a perl script the script is terminating and returning the prompt of the new shell . Can anyone

Execute newgrp system command

2005-11-21 Thread Suvajit Sengupta
Hi, I want to login into a new group using 'newgrp' UNIX command.Every newgrp command invokes a new shell. But when I am trying to execute this system command from a perl script the script is terminating and returning the prompt of the new shell . Can anyone suggest on what can

Re: "system" command help

2005-11-10 Thread Shawn Corey
Marilyn Sander wrote: On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. Actually it is not a boolean value. It is a two-byte value, and each byte is an integer.

Re: "system" command help

2005-11-09 Thread Rakesh Mishra
On 11/10/05, Marilyn Sander <[EMAIL PROTECTED]> wrote: > > > On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: > > > The system function call returns a boolean value as return value, I > > don't > > remember if 1 is for fail and 0 for success or viceversa. > > Actually it is not a boolean value. It i

Re: "system" command help

2005-11-09 Thread Marilyn Sander
On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. Actually it is not a boolean value. It is a two-byte value, and each byte is an integer. You need to look up t

Re: "system" command help

2005-11-09 Thread Pablo Wolter
The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. I think your mistake is the lack of the test construction like if, so if (system("$addgroup \"$group\"") == 0) { ... do something ... } I'm not in a box with perl t

"system" command help

2005-11-09 Thread heena s
hi, is there any mistake in the script: #ADDING A TOOL GROUP system("$addgroup \"$group\"") == 0 or die "system @args failed: $?" &log_message("the group $group added"); thanks - Yahoo! FareChase - Search multiple tr

ulimit and system command

2005-09-23 Thread steve tran
Hello I am noticing a strange phenomenon and I would appreciate it if someone helped me understand it in my shell when I execute ulimit -a I get % ulimit -a time(seconds)unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes)unlimited memory(kbytes

Re: :SSH (How to split value returned by a system command)

2005-02-03 Thread Jay
t; ||-Original Message- > ||From: Babale Fongo [mailto:[EMAIL PROTECTED] > ||Sent: Wednesday, February 02, 2005 11:59 PM > ||To: beginners@perl.org > ||Subject: Net::SSH (How to split value returned by a system command) > || > ||This is what I had: > || > ||@found = rem

Re: Net::SSH (How to split value returned by a system command)

2005-02-02 Thread John W. Krahn
Babale Fongo wrote: This is what I had: @found = remote_cmds ("find $remdir -name '*.zip'"); print "@found" look like this: /path/file1.zip /path/file2.zip /path/file3.zip @found is neither a list nor string, That is correct, it is an array. so it is not handy to deal with. In scalar context, th

RE: :SSH (How to split value returned by a system command)

2005-02-02 Thread Babale Fongo
59 PM ||To: beginners@perl.org ||Subject: Net::SSH (How to split value returned by a system command) || ||This is what I had: || ||@found = remote_cmds ("find $remdir -name '*.zip'"); || ||print "@found" look like this: || ||/path/file1.zip ||/path/file2.zip ||/path/fil

Net::SSH (How to split value returned by a system command)

2005-02-02 Thread Babale Fongo
This is what I had: @found = remote_cmds ("find $remdir -name '*.zip'"); print "@found" look like this: /path/file1.zip /path/file2.zip /path/file3.zip @found is neither a list nor string, so it is not handy to deal with. In scalar context, the command returns 1 (true), in list context it r

RE: Secure Shell and system command

2004-08-30 Thread u235sentinel
I would run system commands with the backticks. That tells Perl to run the command and place the contents in the variable you defined. System OTOH returns if the command completed successfully (at least I believe that's what happened here). > Moon, John wrote: > > Hello, > > > I run the fol

RE: using the system command

2004-07-02 Thread Adamiec, Larry
OK. I found the trouble. It had nothing to do with the system command of copying or moving the files. The code snippet below is inside a foreach loop. That foreach loop was inside another foreach loop (don't ask) so I was actually copying the files twice. That is why the files app

Re: using the system command

2004-07-01 Thread John W . Krahn
On Thursday 01 July 2004 11:34, Adamiec, Larry wrote: > > I am running perl version 5.8.0 on a Sun Solaris 9.0 machine. > > Given the following bit of code: > > $SOME_FILE = $_; > chomp($SOME_FILE); > $SOME_SAFE_FILE = $SOME_FILE . "_lax"; > system ("cp '$SOME_FILE' '$SOME_S

RE: using the system command

2004-07-01 Thread Wiggins d Anconia
> > > > > > I am running perl version 5.8.0 on a Sun Solaris 9.0 machine. > > > > Given the following bit of code: > > > > use strict; > use warnings; > > > $SOME_FILE = $_; > > chomp($SOME_FILE); > > $SOME_SAFE_FILE = $SOME_FILE . "_lax"; > > system ("cp '$SOME_FILE'

RE: using the system command

2004-07-01 Thread Adamiec, Larry
> > I am running perl version 5.8.0 on a Sun Solaris 9.0 machine. > > Given the following bit of code: > use strict; use warnings; > $SOME_FILE = $_; > chomp($SOME_FILE); > $SOME_SAFE_FILE = $SOME_FILE . "_lax"; > system ("cp '$SOME_FILE' '$SOME_SAFE_FILE'"); This is

Re: using the system command

2004-07-01 Thread Wiggins d Anconia
> > I am running perl version 5.8.0 on a Sun Solaris 9.0 machine. > > Given the following bit of code: > use strict; use warnings; > $SOME_FILE = $_; > chomp($SOME_FILE); > $SOME_SAFE_FILE = $SOME_FILE . "_lax"; > system ("cp '$SOME_FILE' '$SOME_SAFE_FILE'"); This is

using the system command

2004-07-01 Thread Adamiec, Larry
I am running perl version 5.8.0 on a Sun Solaris 9.0 machine. Given the following bit of code: $SOME_FILE = $_; chomp($SOME_FILE); $SOME_SAFE_FILE = $SOME_FILE . "_lax"; system ("cp '$SOME_FILE' '$SOME_SAFE_FILE'"); open (IN_FILE, "$SOME_FILE" ); open (TMP_OUT_

Re: system() command

2004-06-08 Thread John W. Krahn
June Tantoolvesm wrote: > > Hi, Hello, > I hope this is the right mailing list. I have two > questions. > > 1. I was wondering if anyone here knows what this > command is doing, besides calling the program > "neighbor"? > > system ("neighbor >/dev/null 2>&1 << ! $inpwd 2 3 Y > !") > > I under

RE: system() command

2004-06-08 Thread Tim Johnson
e- From: june tantoolvesm [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 1:25 AM To: [EMAIL PROTECTED] Subject: system() command Hi, I hope this is the right mailing list. I have two questions. 1. I was wondering if anyone here knows what this command is doing, besides calling

system() command

2004-06-08 Thread june tantoolvesm
Hi, I hope this is the right mailing list. I have two questions. 1. I was wondering if anyone here knows what this command is doing, besides calling the program "neighbor"? system ("neighbor >/dev/null 2>&1 << ! $inpwd 2 3 Y !") I understand up to "2>&1", does anyone knows what comes after that

system() command

2004-06-08 Thread june tantoolvesm
Hi, I hope this is the right mailing list. I have two questions. 1. I was wondering if anyone here knows what this command is doing, besides calling the program "neighbor"? system ("neighbor >/dev/null 2>&1 << ! $inpwd 2 3 Y !") I understand up to "2>&1", does anyone knows what comes after that

system() command

2004-06-08 Thread june tantoolvesm
Hi, I hope this is the right mailing list. I have two questions. 1. I was wondering if anyone here knows what this command is doing, besides calling the program "neighbor"? system ("neighbor >/dev/null 2>&1 << ! $inpwd 2 3 Y !") I understand up to "2>&1", does anyone knows what comes after that

system() command

2004-06-08 Thread june tantoolvesm
Hi, I hope this is the right mailing list. I have two questions. 1. I was wondering if anyone here knows what this command is doing, besides calling the program "neighbor"? system ("neighbor >/dev/null 2>&1 << ! $inpwd 2 3 Y !") I understand up to "2>&1", does anyone knows what comes after that

Re: Return value from system command.

2004-03-11 Thread Silky Manwani
Bingo! Got it... Thanks John and David. :) On Mar 11, 2004, at 4:38 PM, John W. Krahn wrote: Silky Manwani wrote: Hello, Hello, Back with the system command but with a different problem. I am calling a program with the system command which has arguments. This program returns a string and I

Re: Return value from system command.

2004-03-11 Thread John W. Krahn
Silky Manwani wrote: > > Hello, Hello, > Back with the system command but with a different problem. > > I am calling a program with the system command which has arguments. > This program returns a string and I need to capture it. > > @args("command",&qu

RE: Return value from system command.

2004-03-11 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Silky Manwani wrote: > Hello, > > Back with the system command but with a different problem. > > I am calling a program with the system command which has arguments. > This program returns a string and I need to capture it. > > @args("command","arg1"

Return value from system command.

2004-03-11 Thread Silky Manwani
Hello, Back with the system command but with a different problem. I am calling a program with the system command which has arguments. This program returns a string and I need to capture it. @args("command","arg1","arg2"); $res = system(@args); print $res; It

  1   2   >