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
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
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
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
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
What is the proper and best way to use the system command???
System('command');
Or
(system 'command');
Please help!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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>
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
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
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
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,
> >
&
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
> 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
Hello. I am trying to use the system command to run a FORTRAN program on my Solaris
5.7 system. In the code pasted below the following system call: system("chmod 777
/trinidad/uamaero/inputConversions/Bin2Ascii/bin2asciiInputFile.in"); works just
fine. When I actually try to run
i am writing a perl script to run as a cron job and backup my files using dump.
i have defined vars containing stuff like backup target, level of backup
and so on.
I want to issue the command to the command line, including the values of
these vars. I have tried backticking and the system
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
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
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
Guys,
I've got a newbie question: I'm writing a Perl program to get some system
information about particular users.
The command(s):
$command=q(/usr/bin/last vtran|head -1|awk '{print $4,$5}');
$Last=system "$command";
print $Last;
This returns the fields that
Guys, I've got a newbie question - I have been hacking at a perl script to
change it to do what I want - it nearly does but I can't understand why the
main bit isn't working. Basically the script gets sent a string from an
html form which it then needs to use as part of a syste
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!
> -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
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
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
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
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
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.
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
Hello Tyler,
Thursday, September 13, 2001, Tyler Cruickshank <[EMAIL PROTECTED]> wrote:
TC> Hello. I am trying to use the system command to run a FORTRAN
TC> program on my Solaris 5.7 system. In the code pasted below the
TC> following system call:
TC> system(&qu
.bat") should work. If it is a
shell script, system("source bin2ascRunScript.bat") should work. However,
if it is not a shell script, then system("source bin2ascRunScript.bat")
will not work.
HTH,
- Robert
At 04:14 PM 9/12/2001 -0600, Tyler Cruickshank wrote:
>Hello. I am trying t
Hi,
i want to set a timer around a system command, so that IF the command runs
longer than x seconds
send email to the sysadmin
Note: i *DO NOT* want to kill the process - simply want to send a warning
that it is taking longer
than expected
ie
$maxtime=60;# 60 seconds
system
"dump -$level -u -A $archive_dest -f $backup_dest -j 9
$backup_target";
system ("$cmd") or die "command failed: $?";
-Original Message-
From: Mat Harris [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 12:30 PM
To: [EMAIL PROTECTED]
Subject: system
On Jun 4, Mat Harris said:
>I want to issue the command to the command line, including the values of
>these vars. I have tried backticking and the system('command here') but
>they just send the vars as empty strings.
Here's the program:
#!/usr/bin/perl
On Jun 4, Kipp, James said:
>$date = `date +%y%m%e`;
>$backup_dest = "/backup/home/" . "$date" . "-monthly";
Needless quoting of $date, and there's no reason to separate $date from
the rest of the string:
$backup_dest = "/backup/home/$date-monthly";
>$archive_dest = "/backup/home/archives/"
>try:
>--
>#!/usr/bin/perl
>
>$date = `date +%y%m%e`;
>$backup_dest = "/backup/home/" . "$date" . "-monthly";
>$archive_dest = "/backup/home/archives/" . "$date" . "-monthly";
>$backup_target = "/home/";
>$level = '0';
>
>$cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9
>$backup_targ
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_
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
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
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
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
"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
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
Hi, I'm getting a syntax error on the following
command
$PIDS=`ps -ef | grep $user | grep -v grep | cut -b
10-14`
Please help. I need to get the process id of $user
and assign it to PIDS, then kill it.
thanks,
=
Peter Lemus
UNIX/NT Networks Engineer
[EMAIL PROTECTED]
--This world is too
On Jan 22, Kevin Kirwan said:
>$command=q(/usr/bin/last vtran|head -1|awk '{print $4,$5}');
>$Last=system "$command";
>print $Last;
>
>This returns the fields that I want, except I also get the return code (0),
No. This prints the fields you want when you c
From: "Kevin Kirwan" <[EMAIL PROTECTED]>
> Guys,
> I've got a newbie question: I'm writing a Perl program to get some
> system information about particular users. The command(s):
> $command=q(/usr/bin/last vtran|head -1|awk '{print
27;m writing a Perl program to get some
> > system information about particular users. The command(s):
> > $command=q(/usr/bin/last vtran|head -1|awk '{print $4,$5}');
> > $Last=system "$command"; print $Last;
> >
> > This returns the fields
What is the proper and best way to use the system command???
System('command');
Or
(system 'command');
Please help!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ly the script gets sent a string from an
> html form which it then needs to use as part of a system command.
This is very dangerous:
http://someserver.com/cgi-bin/script.pl?ls%3Brm%20-fr%20%2F%3B
With that url, you'll be executing the following:
system("/usr/bin/fms_registra
> This is very dangerous:
>
> http://someserver.com/cgi-bin/script.pl?ls%3Brm%20-fr%20%2F%3B
>
> With that url, you'll be executing the following:
>
> system("/usr/bin/fms_registration ls;rm -fr /; /usr/bin/fmserverd");
>
Curtis thanks for the pointer I am aware that a few changes need to be
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
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
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
>
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
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
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;
> > -
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
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;
> > --
>
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
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
/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
I am modifying a perl script that was originally written for a Solaris
platform, where the unix2dos system command is available. The script puts
text and filenames into a log file, then runs unix2dos command against the
log file, then ships it off as part of a sendmail command.
on OS/390 there
Try the alarm function.
Tor.
Darren Edgerton wrote:
>
> Hi,
>
> i want to set a timer around a system command, so that IF the command runs
> longer than x seconds
> send email to the sysadmin
> Note: i *DO NOT* want to kill the process - simply want to send a warnin
On Apr 8, Darren Edgerton said:
>i want to set a timer around a system command, so that IF the command runs
>longer than x seconds
>
>$maxtime=60;# 60 seconds
>system("some_command_that_takes_longer_than_60secs");
Here's how I'd do it:
{
local $
my_hostname_here
I'm currently calling it with a system command.
Several things could happen to the data stream and I'd like to be able
to build the error checking so that if the stream is broken it will be
reinitialized from the point in time that it was broke, rather than from
the beginning o
Hello. I was wondering if there is a way to capture a system command into a
perl variable. I know this is incorrect, but I basically want to do something
like this:
$date = system("date");
print "Today is $date.";
Thanks,
Jose
--
To unsubscribe, e-mail: [EMAIL PROTE
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
>
> 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
>
> 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
>
>
> >
> > 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'
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
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
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'}";
It might help to know what the error is saying and maybe some surrounding
code but my first reaction is that $user has a \n in it that need to be
chomped.
Also, don't you want @PIDS?
Peter C.
> Hi, I'm getting a syntax error on the following
> command
>
> $PIDS=`ps -ef | grep $user | grep -v g
> Hi, I'm getting a syntax error on the following
> command
>
> $PIDS=`ps -ef | grep $user | grep -v grep | cut -b
> 10-14`
You're missing the semi-colon (;) at the end?
Peter Lemus wrote:
>
> Hi, I'm getting a syntax error on the following
> command
>
> $PIDS=`ps -ef | grep $user | grep -v grep | cut -b
> 10-14`
>
> Please help. I need to get the process id of $user
> and assign it to PIDS, then kill it.
This little script worked on my system to prind out th
> -Original Message-
> From: Ned Cunningham [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 05, 2002 9:49 AM
> To: '[EMAIL PROTECTED]'
> Subject: Running the system command
>
>
> What is the proper and best way to use the system command???
perldoc -f "system"
and it is system("command");
or you could use backticks as in:
$now = "the time is now ".`date`;
i bet someone will comment about the difference between using system and
backticks (don't backticks capture the standard output?)
-k
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
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: $! \
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
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
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
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
I've written a script to search for all *.pid files in a dir, then do
a cat on the file. The script will then use this variable to kill the
process. The problem I'm having is that the varibale is not being
read correctly. I run the script and the kill process tries to run
without the variable.
Hi,
I am facing an issue with the perl system command
The relevant lines of code are the following:
chdir "$util";
my @args = ("ldapmodify", "-D \"cn=$bdn\"", "-w $bp", "-h $svr", "-f \"$ldif\"", "-c",
&q
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
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
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_
"Rice, Elizabeth A." wrote:
> on OS/390 there is no unix2dos command available. So, if I use the file as
> is, it is sent in the email but it comes out with no carriage returns, etc.,
> making the file unreadable when it is of any significant size.
You can use a simple oneliner in Perl to conve
>> on OS/390 there is no unix2dos command available. So, if I use the file
as
>> is, it is sent in the email but it comes out with no carriage returns,
etc.,
>> making the file unreadable when it is of any significant size.
>You can use a simple oneliner in Perl to convert text files see
>htt
On Oct 25, Rice, Elizabeth A. said:
>2- I get "Illegal Hexadecimal Digit '\' ignored" against the line that has
>the regex. If I change the regexto s/\xa/\xda/g
> then I no longer get this error, but still no output is given. This is
>on OS/390 Unix. I'm not sure if EBCDIC is messing
Hi All,
I've never tried something like this before, so
my apologies if it's "easy"
We all know about the system command:
my $program = "some_script.pl";
system("perl",$program);
This would execute the program some_script.pl
on the current host.
On Wed, 14 Aug 2002, Jose Malacara wrote:
> Hello. I was wondering if there is a way to capture a system command into a
> perl variable. I know this is incorrect, but I basically want to do something
> like this:
>
> $date = system("date");
> print "Today i
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"
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
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
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
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
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
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
1 - 100 of 166 matches
Mail list logo