Niko zuna wrote:
Hi!
Hello,
I made this short script in order to see if there is posible to run
"modified" unix commands from a Perl script.
#!/usr/bin/perl
use
strict;
use
warnings;
my $load = `uptime | awk '{print $8 $9 $10 $11 $12}'`;
my ( $load ) = `uptim
On Friday 09 Apr 2010 18:31:31 Niko zuna wrote:
> Hi!
>
> I made this short script in order to see if there is posible to run
> "modified" unix commands from a Perl script.
>
> #!/usr/bin/perl
>
>
>
> use
> strict;
>
> use
> warnings;
>
Niko zuna wrote:
Hi!
I made this short script in order to see if there is posible to run
"modified" unix commands from a Perl script.
#!/usr/bin/perl
use
strict;
use
warnings;
my $load = `uptime | awk '{print $8 $9 $10 $11
$12}'`;
print "$load\n";
when
On Fri, Apr 9, 2010 at 11:31 AM, Niko zuna wrote:
> Use of uninitialized value $8 in concatenation (.) or string at ./test.plline
> 6.
> Use of uninitialized value $9 in concatenation (.) or string at ./test.plline
> 6.
> Use of uninitialized value $10 in concatenation (.) or string at
> ./test.
Hi!
I made this short script in order to see if there is posible to run
"modified" unix commands from a Perl script.
#!/usr/bin/perl
use
strict;
use
warnings;
my $load = `uptime | awk '{print $8 $9 $10 $11
$12}'`;
print "$load\n";
when I am trying to ru
Hi!
I made this short script in order to see if there is posible to run
"modified" unix commands from a Perl script.
#!/usr/bin/perl
use
strict;
use
warnings;
my $load = `uptime | awk '{print $8 $9 $10 $11
$12}'`;
print "$load\n";
when I am trying to ru
On 10/9/09 Fri Oct 9, 2009 7:43 AM, "Harry Putnam"
scribbled:
> I'm thinking of splitting on something like ' +' (+) since
> no regular output will have 2 spc or more between connected
> words I mean words that belong in a group.
I would use the construct /\s{2,}/ for "two or more spaces"
Jim Gibson writes:
> You might try splitting the line on whitespace, extracting the first two and
> last two elements, then joining the remainder back with a space. You can
> then test the length of the middle string for excessive length and print or
> trim accordingly. This will concatenate any
On 10/8/09 Thu Oct 8, 2009 3:56 PM, "Harry Putnam"
scribbled:
> Shlomi Fish writes:
>
>> Hi Harry!
>
> [...]
>
>>>
>>> I want to catch those long lines and format them like one might format
>>> a news/mail message... wrapped at column 72 or so but also indented
>>> whatever spcs looks good
Shlomi Fish writes:
> Hi Harry!
[...]
>>
>> I want to catch those long lines and format them like one might format
>> a news/mail message... wrapped at column 72 or so but also indented
>> whatever spcs looks good.
>>
>> I looked at perldoc -f format but that says its about pictures and
>> do
Hi Harry!
On Thursday 08 Oct 2009 21:29:04 Harry Putnam wrote:
> I'm just looking for a push to get started... I do have some perl
> skills (pretty lowlevel to be sure) so can do basic formating with
> printf and such.
>
> But here... I expect my input to be pretty uniform actually already
> form
I'm just looking for a push to get started... I do have some perl
skills (pretty lowlevel to be sure) so can do basic formating with
printf and such.
But here... I expect my input to be pretty uniform actually already
formatted ok. Except, 1 or 2 lines somewhere in the input that will be
longer a
lerameur wrote:
Hello,
Hello,
I want to write a perl script that invokes unix command.
perldoc -f qx
perldoc -f system
perldoc -f fork
perldoc -f exec
perldoc -f open
perldoc perlipc
perldoc perlopentut
perldoc IPC::Open2
perldoc IPC::Open3
perldoc IPC::Run
perldoc Expect
perldoc Shell
Think you mean foreground or background.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 20 September 2007 15:59
To: lerameur; beginners@perl.org
Subject: Re: unix commands
--- lerameur <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to writ
--- lerameur <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to write a perl script that invokes unix command. Some of the
> command can take a long time to process, I have many commands I want
> to invoke. Lets say the first command can take one minute to
> process, how can I make sure the se
Hello,
I want to write a perl script that invokes unix command. Some of the
command can take a long time to process, I have many commands I want
to invoke. Lets say the first command can take one minute to
process, how can I make sure the second command will not start until
the irst one is comp
[EMAIL PROTECTED] wrote:
> Hi all,
Hello,
> How do I parse or evaluate the output of UNIX commands?
>
> For example, in UNIX scripts, I can run filesystem=`df -k | awk -F"" ' { print
> $6 }'` to check for the mount points.
>
> How do I achieve the sa
Hi,
[EMAIL PROTECTED] asked:
> How do I parse or evaluate the output of UNIX commands?
>
> For example, in UNIX scripts, I can run filesystem=`df -k |
> awk -F"" ' { print
> $6 }'` to check for the mount points.
>
> How do I achieve the same in Perl? T
On Fri, 2006-10-27 at 17:30 +1300, [EMAIL PROTECTED] wrote:
> Hi all,
>
> How do I parse or evaluate the output of UNIX commands?
>
> For example, in UNIX scripts, I can run filesystem=`df -k | awk -F"" ' { print
> $6 }'` to check for the mount points.
Hi all,
How do I parse or evaluate the output of UNIX commands?
For example, in UNIX scripts, I can run filesystem=`df -k | awk -F"" ' { print
$6 }'` to check for the mount points.
How do I achieve the same in Perl? That is, I tried:
#!/usr/bin/perl
$x=s
> -Original Message-
> From: Joel [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 6 March 2004 1:29 PM
> To: perl
> Subject: Re: hi!!
I've changed your subject to be more appropriate to the question asked.
>
> This is off topic, but is cygwin just the ports of GNU
> software for windows,
>
Rob:
Thank you for responding to my post! I just got back from a long week
end. Did not check my email
[EMAIL PROTECTED] wrote:
Wiggins D'Anconia wrote:
Mame Mbodji wrote:
I am researching some unix commands and I would like to know if someone
knows where I can find them online. I
Wiggins D'Anconia wrote:
>
> Mame Mbodji wrote:
> > I am researching some unix commands and I would like to know if someone
> > knows where I can find them online. I just want to know what are they
> > used for and if there are some available examples online.The c
On Fri, 14 Nov 2003 20:36:54 -0500, Mame Mbodji wrote:
> I am researching some unix commands and I would like to know if someone
> knows where I can find them online.
What does this have to do with Perl? The obvious answer, though, is to
tap twice on the TAB key, write down what you se
[EMAIL PROTECTED] wrote:
I am researching some unix commands and I would like to know if
someone knows where I can find them online. I just want to know what
are they used for and if there are some available examples online.The
commands are: snapshot and sdtprocess.
Sorry if this is not the
Mame Mbodji wrote:
I am researching some unix commands and I would like to know if someone
knows where I can find them online. I just want to know what are they
used for and if there are some available examples online.The commands
are: snapshot and sdtprocess.
Sorry if this is not the right
I am researching some unix commands and I would like to know if someone
knows where I can find them online. I just want to know what are they
used for and if there are some available examples online.The commands
are: snapshot and sdtprocess.
Sorry if this is not the right place to post this
I cant use Telnet or Sockets because the modules are
not loaded on. I want to automate telnets to a list of
ips.
It looks like this is running but I am not prompted
for a login and password until after I interupt the
script.
How can I get the prompts sent to the display then
return to the per
You should be able to do this using the Perl Expect module, although not
sure about the Windows part.
-Jose
- Original Message -
From: "Prachi Shah" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 1:08 PM
Subject: run UNIX commands f
Hi All!
Is there a way to login to a UNIX system, run an application and retrieve a
file written by that application using Perl from a Windows system?
thanks,
Prachi.
_
The new MSN 8: smart spam protection and 2 months FREE*
h
Did U chk the directory u r in
try doing this
`cd $DIRECTORY; cp src dest `;
Ronnie Livingston wrote:
> Hi, I have a textfile with a list of gifs (ex. planet.gif, star.gif)and I
> have a perl program which grabs one of the filenames randomly. What I
> want to do is use the filename and copy it
doh, that did it. thanks felix.
-Ronnie
On 14 Jun 2002, Felix Geerinckx wrote:
> on Fri, 14 Jun 2002 06:43:53 GMT, [EMAIL PROTECTED] (Ronnie
> Livingston) wrote:
>
> > Hi, I have a textfile with a list of gifs (ex. planet.gif,
> > star.gif)and I have a perl program which grabs one of the
> > fi
on Fri, 14 Jun 2002 06:43:53 GMT, [EMAIL PROTECTED] (Ronnie
Livingston) wrote:
> Hi, I have a textfile with a list of gifs (ex. planet.gif,
> star.gif)and I have a perl program which grabs one of the
> filenames randomly. What I want to do is use the filename and
> copy it to random.gif but I k
Hi, I have a textfile with a list of gifs (ex. planet.gif, star.gif)and I
have a perl program which grabs one of the filenames randomly. What I
want to do is use the filename and copy it to random.gif but I keep
getting the error:
cp: cannot access planet.gif
I have been using this in my perl p
> Hi guys,
>
> I was wondering if anyone knows how to execute Unix
> commands in a Perl Script?
system(echo Hello World);
my $output = qx(echo Hello There);
print "The shell said :$output\n";
perldoc -f system
perldoc
system( "cat myfile");
or
qx( cp file1 file2);
At 03:16 PM 2/20/2002 -0800, John W. Krahn wrote:
>Tony Ho wrote:
> >
> > Hi guys
>
>Hello,
>
> > I was wondering if anyone knows how to execute Unix commands in a Perl
> > Script ?
>
>
>u
Tony Ho wrote:
>
> Hi guys
Hello,
> I was wondering if anyone knows how to execute Unix commands in a Perl
> Script ?
use Shell;
my $ps = ps( 'ax' );
print $ps;
my @ls = ls( '-al' );
print $ls[ 7 ];
perldoc Shell
John
--
use Perl;
program
fulfill
On Wed, 20 Feb 2002, Booher Timothy B 1stLt AFRL/MNAC wrote:
> You simply enclose your unix commands in ''.
>
> i.e.
>
> #!untested
>
> 'ls -la'
I think you mean ` `, (backticks), right?
-- Brett
Tony,
You simply enclose your unix commands in ''.
i.e.
#!untested
'ls -la'
tim
Timothy B Booher, Lt USAF
Research Engineer
AFRL/MNAC
101 W. Eglin Blvd.
Eglin AFB, FL 32542-6810
Telephone: 850-882-8302 ext. 336
If I understood your question, you could use "system" or "command ticks".
That is:
system("cal") //be careful
or
$a = `cal`;
depending on how you want to treat the output.
If you want to manipulate the output, use command ticks.
__
William Ampeh (x3939)
Federal Reser
This is easy to manipulate, though as time has went by I've found that
perl already can do what i try to do by using system commands. here's a
quick example with backticks, though it is not the only way, or correct
one dependent on your need.
this would require fortune to be in your path ahead of
t;jfserver.log","-z".$P
DFPath.$PDFName);
The second argument JFMERGE is a .exe
Regards,
Mike
-Original Message-
From: Ho, Tony [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 11:49 AM
To: '[EMAIL PROTECTED]'
Subject: Unix commands in Perl scripts
Hi guys
I was wondering if anyone knows how to execute Unix commands in a Perl
Script ?
I would be most grateful if you could let me know
Thanks in advance
Tony
On Mon, 6 Aug 2001, Chris Garaffa wrote:
> Hello everyone. I just joined the list, but I checked the archive earlier
> to see if this was covered. Sorry if I missed it.
>
> My question is regarding UNIX commands. I know you can get the output of a
> command using the ` notation
f thumb - if you can avoid using a system call, do so.
Good Luck!
Matt
-Original Message-
From: Peter Scott [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 5:18 PM
To: Chris Garaffa; [EMAIL PROTECTED]
Subject: Re: Calling UNIX Commands?
At 08:15 PM 8/6/01 -0400, Chris Garaffa
At 08:15 PM 8/6/01 -0400, Chris Garaffa wrote:
>My question is regarding UNIX commands. I know you can get the output of a
>command using the ` notation. My script has this line:
>my $command = `mv /$formdata{name}.html /Library/WebServer/Document/About/
>$formdata{name}.html`;
You
Hello everyone. I just joined the list, but I checked the archive earlier
to see if this was covered. Sorry if I missed it.
My question is regarding UNIX commands. I know you can get the output of a
command using the ` notation. My script has this line:
my $command = `mv /$formdata{name}.html
At 11:33 AM 6/14/01 -0500, John Joseph Roets wrote:
>I found a site a while back which detailed a pursuit to develop Perl
>commands to replace universal UNIX commands.
>Thus, providing advanced benefits/features, such as more full regex matching
>abilities, etc.
>My problem:
>
* John Joseph Roets ([EMAIL PROTECTED]) [14 Jun 2001 16:34]:
> I found a site a while back which detailed a pursuit to develop Perl
> commands to replace universal UNIX commands. Thus, providing advanced
> benefits/features, such as more full regex matching abilities, etc.
> My p
I found a site a while back which detailed a pursuit to develop Perl
commands to replace universal UNIX commands.
Thus, providing advanced benefits/features, such as more full regex matching
abilities, etc.
My problem:
I cannot now find this site. I can't even remember how I came acro
On Sat, 12 May 2001, cherukuwada subrahmanyam wrote:
> Is there any way we can use perl to execute interactive unix commands
> without being prompted for arguments?
Of course. You can pipe into the programs standard input. Or you can use
the Exepct module form CPAN.
--
> Is there any way we can use perl to execute interactive
> unix commands without being prompted for arguments?
In general, just pipe into the command's standard input.
> Ex:- passwd command asks for the password.
I suspected passwd might be different, so I did a
quick deja
Hi,
Is there any way we can use perl to execute interactive unix commands
without being prompted for arguments?
Ex:- passwd command asks for the password. Can we use perl to make a wrapper
around the passwd command so that we can pass the arguments to the wrapper
while executing it i.e wrap.pl
53 matches
Mail list logo