Thanks a lot.
On Wed, 26 Feb 2025 at 8:55 AM, Jim Gibson wrote:
> If you are reading a file with normal line endings (e.g., “\n”), then you
> want to parse each line as “key: value” using a regular expression, save
> the job id, current status and current phase values. When you have all
> three
If you are reading a file with normal line endings (e.g., “\n”), then you want
to parse each line as “key: value” using a regular expression, save the job id,
current status and current phase values. When you have all three, you can check
the status and phase values for the values you are lookin
What is the record separator? How can we tell `Job ID: 52` from `Job ID:
51`?
The input record separator is newline by default. If you want the Job ID of
the records where status=SUCCEEDED, you'll need to set the record separator
to something other than "\n" and do a multi-line search.`/m`.
I thin
The problem with grep is that line numbers may change so even if i do grep
-E SUCCEEDED|"\ "ZDM_SETUP_TGT\"" -B5 , it may not alway 5 line above or
is there a more better way in grep or regex
On Tue, Feb 25, 2025 at 10:22 PM Erick Paquin wrote:
> You can use grep for this..
>
> ---
> Erick Pa
You can use grep for this..
---
Erick Paquin
On 25/02/2025 11:49 am, Asad wrote:
Hi All,
I have a requirement to use regex , find the Job ID for the Current
status: SUCCEEDED and Current Phase: "ZDM_SETUP_TGT" from a file
which has data in the format gives below :
Job ID: 52
User: zdmuser
Cl
Hi All,
I have a requirement to use regex , find the Job ID for the Current
status: SUCCEEDED and Current Phase: "ZDM_SETUP_TGT" from a file
which has data in the format gives below :
Job ID: 52
User: zdmuser
Client: zdmhost
Job Type: "EVAL"
...
Current status: SUCCEEDED
Current Phase: "ZDM_SETU
header tag to be printed, enclosed by {} characters. Tag names are
case insensitive, and the leading RPMTAG_ portion of the tag name may
be omitted as well.
On Thu, Aug 9, 2018 at 4:32 PM, Home Linux Info
wrote:
>
> Hello,
>
> You can begin with "*[a-zA-Z_+-]{3
Hello,
You can begin with "*[a-zA-Z_+-]{3,}[0-9]*" to get the package name, it
needs a little more work for right now it gets the last dash and first
digit of package version. Then you can try "*([^a-zA-Z_+-]{3,})(.\d{1,})*".
The first regex gives the following result:
/b
Hi Asad,
On Fri, 27 Jul 2018 18:24:39 +0530
Asad wrote:
> Hi All ,
>
> I want to get a regex to actually get the rpm name and version for
> comparison :
>
>
> binutils-2.23.52.0.1-12.el7.x86_64",
> compat-libcap1-1.10-3.el7.x86_64"
> compat-lib
, $version, $build) = $s =~ m{
^ (.*) # name
- (.*) # version
- ([0-9]+) # build
[.] [^.]+ # os
[.] [^.]+ \z # architecture
}x;
print "n $name v $version b $build\n";
}
On Fri, Jul 27, 2018 at 9:14 AM Chas. Owens wrote:
> I don't think a regex is the simplest and most maint
I would suggest you change your approach and user the query mode of RPM to get
your information instead of build up a regexp:
rpm -qa --queryformat "%{NAME}\n"
Duncs
From: Asad [mailto:asad.hasan2...@gmail.com]
Sent: 27 July 2018 13:55
To: beginners@perl.org
Subject: regex to g
I don't think a regex is the simplest and most maintainable way to get this
information. I think it is probably better to take advantage of the
structure of the string to discard and find information:
#!/usr/bin/perl
use strict;
use warnings;
for my $s (qw/binutils-2.23.52.0.1-12.el7.x
Hi All ,
I want to get a regex to actually get the rpm name and version for
comparison :
binutils-2.23.52.0.1-12.el7.x86_64",
compat-libcap1-1.10-3.el7.x86_64"
compat-libstdc++-33-3.2.3-71.el7.i686
(^[a-zA-Z0-9\-]*)\-\d'
First part of the regular expression is ^[a-zA
e/aj/out.txt');
> my $data = $file->slurp_utf8;
> $data =~ s/some label.*/${1} $newdata} ]/x;
> $file->spew_utf8( $data );
>
> The app runs as
>
> USER = "appuser"
> GROUP = "appgroup"
>
> and the
snip
> So I guess the question is -
>
> - is there a way in perl to authorize the callED perl script to have
> higher perms than the callING app's, so that it can write to the file I'm
> targeting?
>
> Or do I have to to this OUTSIDE of the perl script?
>
The short answer is that this is OS depen
me/aj/out.txt
But if the calling app's running as a unique user
'appuser' == 'testapp'
'appgroup' == 'testapp'
where
id testapp
uid=12345(testapp) gid=12345(testapp) groups=12345(testapp)
grep testapp /etc/
$data =~ s/some label.*/${1} $newdata} ]/x;
> $file->spew_utf8( $data );
>
>The app runs as
>
> USER = "appuser"
> GROUP = "appgroup"
>
>and the perl-script's output file gets CHANGED to ownership by the SAME
>user & group
rl-script's output file gets CHANGED to ownership by the SAME user &
group, 'appuser'/'appgroup'.
How do I get that output file written with owndership by some OTHER user, eg
USER = "otheruser"
GROUP = "othergroup"
?
AJ
--
T
Hi Raj,
On Thu, 14 Apr 2016 16:15:08 +
Raj Barath wrote:
> I was wrong. Please don't use my example.
> Aaron wells explanation is perfect.
>
Thanks for admitting you were wrong - many people fail to do so. I agree that
Aaron Wells's explanation appears to be very good, and one can find mor
either a string, a number, or a reference
of some sort. Then if what you’ve gotten is a reference, and you want to get
values out of it, you need to dereference that, as I’ve shown in the last
example ( [SIGIL]{ $ref }, etc. ). $way1 above shows explicitly the chain of
dereferencing that happens as
either a string, a number, or a reference
of some sort. Then if what you’ve gotten is a reference, and you want to get
values out of it, you need to dereference that, as I’ve shown in the last
example ( [SIGIL]{ $ref }, etc. ). $way1 above shows explicitly the chain of
dereferencing that happens as
that whenever you retrieve a value from a data
structure, it’s going to be a scalar: either a string, a number, or a reference
of some sort. Then if what you’ve gotten is a reference, and you want to get
values out of it, you need to dereference that, as I’ve shown in the last
example ( [SIGIL]{
Hello Raj,
On Thu, 14 Apr 2016 03:52:56 +
Raj Barath wrote:
> Hello Kenneth,
>
> Check this out:
>
> use v5.22;
> use Data::Dumper;
>
> my $VAR1;
>
> $VAR1 = [
> bless( {
>'Id' => [
>'01tC003udXAIAY',
>
;>'Id' => [
>>'01tC003udXAIAY',
>>'01tC003udXAIAY'
>> ],
>>'type' => 'Product2'
>>
;>'Id' => [
>>'01tC003udXAIAY',
>>'01tC003udXAIAY'
>> ],
>>'type' => 'Product2'
>>
'type' => 'Product2'
>> }, 'sObject' )
>> ];
>>
>> So if the data structure is contained in a Perl variable called
>> $data, then I think that this is a reference to a hash.
>>
>> So
$data, then I think that this is a reference to a hash.
So I need to do something like "@{$data}" to get to the hash.
But I want the "Id" element of the hash so I want something like
@{$data}->{'Id'}
But that's the array, so what about ${@{$data}->{
;
> So if the data structure is contained in a Perl variable called
> $data, then I think that this is a reference to a hash.
>
> So I need to do something like "@{$data}" to get to the hash.
>
> But I want the "Id" element of the hash so I want something li
'01tC003udXAIAY'
],
'type' => 'Product2'
}, 'sObject' )
];
So if the data structure is contained in a Perl variable called
$data, then I think that this is a reference to a hash.
So I ne
> On Mar 13, 2015, at 2:07 PM, Sherman Willden
> wrote:
>
> I downloaded Eclipse and I was looking at the screens and in general just
> messing with Eclipse. Now I can't find the first splash screen with the
> tutorials, samples, and such. Also is there a help button on Eclipse?
It has been
I downloaded Eclipse and I was looking at the screens and in general just
messing with Eclipse. Now I can't find the first splash screen with the
tutorials, samples, and such. Also is there a help button on Eclipse?
Thank you;
Sherman
Ok, this is not a code related question, but anyone has an idea of
when/how/if it will be available the video of the FOSDEM Larry's talk?
https://fosdem.org/2015/schedule/event/get_ready_to_party/
I'm very curious about it!
Luca
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For addi
On Mon, Jan 5, 2015 at 3:20 PM, Harry Putnam wrote:
> When running shell commands from perl script with an open() instead of
> system() or exec how is the return value snagged.
>
> I guess, if it doesn't die, it worked but how to snag that information
> and at what point?
>
> --- 8< snip
Harry:
On Mon, Jan 05, 2015 at 06:20:06PM -0500, Harry Putnam wrote:
> When running shell commands from perl script with an open() instead of
> system() or exec how is the return value snagged.
>
> I guess, if it doesn't die, it worked but how to snag that information
> and at what point?
>
> -
When running shell commands from perl script with an open() instead of
system() or exec how is the return value snagged.
I guess, if it doesn't die, it worked but how to snag that information
and at what point?
--- 8< snip -- 8< snip -- 8', "$log" or die
"Can't open $log: $
Great thank you!
On Fri, Feb 21, 2014 at 6:02 PM, Jim Gibson wrote:
>
> On Feb 21, 2014, at 6:21 AM, Wernher Eksteen wrote:
>
> > Hi all,
> >
> > From the below file names I only need the version number 1.2.4 without
> explicitly specifying it.
> >
> > check_mk-1.2.4.tar.gz
> > check_mk-agen
lues from all.
> >
> >
> > From that I want to get the value 1.2.4 and assign it to a variable, if
> there are more than one value such as 1.2.5 and 1.2.6 as well, it should
> print them too, but only the unique values.
> >
> > My attempt shown below to print only
.5 and 1.2.6 to print the
> unique values from all.
>
>
> From that I want to get the value 1.2.4 and assign it to a variable, if there
> are more than one value such as 1.2.5 and 1.2.6 as well, it should print them
> too, but only the unique values.
>
> My attempt shown
On Feb 21, 2014, at 6:21 AM, Wernher Eksteen wrote:
> Hi all,
>
> From the below file names I only need the version number 1.2.4 without
> explicitly specifying it.
>
> check_mk-1.2.4.tar.gz
> check_mk-agent-1.2.4-1.noarch.rpm
> check_mk-agent-logwatch-1.2.4-1.noarch.rpm
> check_mk-agent-
ss details?
foreach my $i (@fileList2) {
my $file = "$url/$i" if $i =~ m/$getMenuItem/g;
chomp($file);
my $ff = File::Fetch->new(uri => "$file");
my $where = $ff->fetch() or die $ff->error;
}
Thanks,
Wernher
On Sun, Feb 23, 2014 at 4:35 PM, shawn wilson
Use LWP to get web data - not lynx and the like unless you can't help it. I
prefer using Web::Scraper to parse html but either way it's probably best
not to use a regex (see SO and similar for discussions on the like).
On Feb 23, 2014 8:13 AM, "Wernher Eksteen" wrote:
>
&g
im of this script is to connect to the
site, remove all html tags and obtain only the file names I need.
#!/usr/bin/perl
use strict;
use warnings;
*# initiating package names to be used later*my @getList;
my @fileList;
*# get files using lynx and parse through it*my $url = "
http://math
On Fri, 21 Feb 2014 16:21:57 +0200
Wernher Eksteen wrote:
> Hi all,
>
> From the below file names I only need the version number 1.2.4 without
> explicitly specifying it.
>
> check_mk-1.2.4.tar.gz
> check_mk-agent-1.2.4-1.noarch.rpm
> check_mk-agent-logwatch-1.2.4-1.noarch.rpm
> check_mk-ag
Hi all,
>From the below file names I only need the version number 1.2.4 without
explicitly specifying it.
check_mk-1.2.4.tar.gz
check_mk-agent-1.2.4-1.noarch.rpm
check_mk-agent-logwatch-1.2.4-1.noarch.rpm
check_mk-agent-oracle-1.2.4-1.noarch.rpm
mk-livestatus-1.2.4.tar.gz
mkeventd-1.2.4.tar
On Jan 27, 2014, at 11:32 PM, Luca Ferrari wrote:
> Hi all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $month, $year) = (localtime())[3..5];
> $month++, $year += 1900;
> print "\nToday is $month / $day
On Jan 28, 2014, at 8:59 PM, Rob Dixon wrote:
> It is probably best to use the Time::Piece module, which has been part of
> core Perl 5 since version 10
Side question: does anyone know why the Perl team chose Time::Piece
over Date::Time to be bundled with Perl? I've known about Date::Ti
On Wed, Jan 29, 2014 at 5:59 AM, Rob Dixon wrote:
> It is probably best to use the Time::Piece module, which has been part of
> core Perl 5 since version 10 so you shouldn't need to install it.
>
Thanks, I was not aware of it. And it does what I need.
Luca
--
To unsubscribe, e-mail: beginners-
On 28/01/2014 07:32, Luca Ferrari wrote:
Hi all,
often I find myself writing something like the following to get the
"human" date:
my ($day, $month, $year) = (localtime())[3..5];
$month++, $year += 1900;
print "\nToday is $month / $day / $year \n";
I was wondering if there
On Tue, 28 Jan 2014 08:32:20 +0100
Luca Ferrari wrote:
> Hi all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $month, $year) = (localtime())[3..5];
> $month++, $year += 1900;
> print "\nToday is $mon
On 2014-01-28 08:32, Luca Ferrari wrote:
often I find myself writing something like the following to get the
"human" date:
my ($day, $month, $year) = (localtime())[3..5];
$month++, $year += 1900;
print "\nToday is $month / $day / $year \n";
I was wondering if there's
all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $month, $year) = (localtime())[3..5];
> $month++, $year += 1900;
> print "\nToday is $month / $day / $year \n";
>
>
> I was wondering if there's a
Hi Luca,
Check this:
http://stackoverflow.com/questions/11020812/todays-date-in-perl-in-mm-dd--format
On 28 January 2014 13:02, Luca Ferrari wrote:
> Hi all,
> often I find myself writing something like the following to get the
> "human" date:
>
> my ($day, $m
Hi all,
often I find myself writing something like the following to get the
"human" date:
my ($day, $month, $year) = (localtime())[3..5];
$month++, $year += 1900;
print "\nToday is $month / $day / $year \n";
I was wondering if there's a smarter pattern to get the right
On Thu, Dec 26, 2013 at 5:34 PM, John W. Krahn wrote:
> Kenneth Wolcott wrote:
>>
>> Hello;
>
>
> Hello Kenneth,
>
>
>
>>I'm trying to obtain line-by-line output from a command pipe in perl.
>>
>>Unfortunately, I am firmly held to 5.8.8 version of perl on this
>> specific machine :-(
>>
>>
you use an array, it is _not_ sent thru the shell. Try the
> three-argument open:
>
> open my $fh, '-|', @cmd or die "blah: $!\n"; fails, "Unknown open()
> mode '5'";
That won't get sent through the shell either:
[SHELL]
shlomif[
On Mon, 23 Dec 2013 15:02:13 -0800
Kenneth Wolcott wrote:
> open my $fh, @cmd, "|" or die "blah: $!\n"; fails, "Unknown open()
> mode '5'"
If you use an array, it is _not_ sent thru the shell. Try the
three-argument open:
open my $fh, '-|', @cmd or die "blah: $!\n"; fails, "Unknown open()
Hello;
I'm trying to obtain line-by-line output from a command pipe in perl.
Unfortunately, I am firmly held to 5.8.8 version of perl on this
specific machine :-(
Apparently, creating an array for my command prevents me from
including the final pipe symbol when trying to use the three-argu
y email and those from threads in which there is my reply also be
> send like on web forum when you subscribe to thread you get only
> reminders of that thread and not whole forum.
> Yesterday I subscribed to two email list from perl and now in the
> morning I got 31 message
rum when you subscribe to thread you get only
reminders of that thread and not whole forum.
Yesterday I subscribed to two email list from perl and now in the
morning I got 31 messages whom majority I'm not interested in.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For ad
How do you will reply a message, if you will not receive it ?
2013/5/27 R. S.
> I've send request to beginners-help but there seems to be no such
> command.
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http:/
I've send request to beginners-help but there seems to be no such
command.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Mon, Jul 30, 2012 at 6:32 PM, Jenda Krynicky wrote:
>
> Just to prevent confusion ... the "use autodie" is not needed to be
> able to open a "filehandle into a string". ...
> It forces some Perl builtins to throw an exception instead of
> reporting success or failure using their return values.
From: Shlomi Fish
> Hi Thomas,
>
> On Mon, 30 Jul 2012 20:23:58 +0800
> Thomas Dean wrote:
>
> > Hi there,
> >
> > I'm wondering how to get the file handle or a reference of a file
> > object of a scalar in which stores a string.
> >
>
&g
Hi Thomas,
On Mon, 30 Jul 2012 20:23:58 +0800
Thomas Dean wrote:
> Hi there,
>
> I'm wondering how to get the file handle or a reference of a file
> object of a scalar in which stores a string.
>
Starting from relatively recent versions of Perl, you can simply do:
use
Hi there,
I'm wondering how to get the file handle or a reference of a file
object of a scalar in which stores a string.
Thanks,
Thomas
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hi,
I am executing a Sybase stored procedure using 'nsql'. Now I want to
capture entire server output (NOT just value of output parameters) via my
perl script.
Please let me know how to do that?
*Piece of code that I am using:*
use Sybase::DBlib;
my $dbh = new Sybase::DBlib $dbUserName, $dbPass
On 12-06-11 11:04 AM, lina wrote:
#!/usr/bin/env perl
use strict;
use warnings;
use autodie qw(open close);
use Carp qw(croak);
use 5.012;
my $tra=7;
my @files=("01".."40");
foreach(@files){
$tra=process_onefile("replica_index_$_.xvg");
}
sub process_onefile{
my $b
On Mon, Jun 11, 2012 at 10:42 PM, Brian Fraser wrote:
> On Mon, Jun 11, 2012 at 10:49 AM, lina wrote:
>>
>> Hi,
>>
>>
>> $ for i in `seq -f '%02g' 1 10` ; do echo $i ; done
>> 01
>> 02
>> 03
>> 04
>> 05
>> 06
>&g
On Mon, Jun 11, 2012 at 10:49 AM, lina wrote:
> Hi,
>
>
> $ for i in `seq -f '%02g' 1 10` ; do echo $i ; done
> 01
> 02
> 03
> 04
> 05
> 06
> 07
> 08
> 09
> 10
>
> I wonder how can I get something like above in the perl.
>
>
for my $i ("01".."10") {
say $i;
}
Hi,
On Mon, 11 Jun 2012 07:10:07 -0700
"Ron Bergin" wrote:
> >lina wrote:
> > Hi,
> >
> >
> > $ for i in `seq -f '%02g' 1 10` ; do echo $i ; done
> > 01
> > 02
> > 03
> > 04
> > 05
> > 06
> > 07
> &g
>lina wrote:
> Hi,
>
>
> $ for i in `seq -f '%02g' 1 10` ; do echo $i ; done
> 01
> 02
> 03
> 04
> 05
> 06
> 07
> 08
> 09
> 10
>
> I wonder how can I get something like above in the perl.
>
perl -e "for (1..10){printf(qq
How about:
use strict;
use warnings;
foreach my $i(1..10){$i="0" . $i if length($i)==1;print "$i\n";}
-Original Message-
From: lina [mailto:lina.lastn...@gmail.com]
Sent: Monday, June 11, 2012 8:49 AM
To: beginners@perl.org
Subject: how to get a sequence of 01 02 .
Hi,
$ for i in `seq -f '%02g' 1 10` ; do echo $i ; done
01
02
03
04
05
06
07
08
09
10
I wonder how can I get something like above in the perl.
Thanks ahead for your suggestions,
Best regards,
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional comman
Chris Nehren wrote:
On Wed, May 30, 2012 at 16:22:29 -0500 , Matt wrote:
I did this. Snippet from larger code:
eval {
$rststr = "";
local $SIG{ALRM} = sub { die "get timeout" };
alarm(30);
$rststr = get("http://"; . $dst .
On Wed, May 30, 2012 at 16:22:29 -0500 , Matt wrote:
> I did this. Snippet from larger code:
>
> eval {
> $rststr = "";
> local $SIG{ALRM} = sub { die "get timeout" };
> alarm(30);
> $rststr = get("http://";
>> Thanks. Yes, using Simple. Looking at this.
>>
>> Can I do something as simple as this?
>>
>> $rststr = "";
>> alarm(60); # set timer for 60 seconds
>> $rststr = get("http://"; . $dst . "/request.htm" ); # try to get my
On Tue, May 29, 2012 at 21:45:16 -0500 , Matt wrote:
> Thanks. Yes, using Simple. Looking at this.
>
> Can I do something as simple as this?
>
> $rststr = "";
> alarm(60); # set timer for 60 seconds
> $rststr = get("http://"; . $dst . "/request.h
>> I have a line like this:
>>
>> $rststr = get("http://"; . $dst . "/request.htm" );
>>
>> Problem is that I have had this script hang due to the $dst site being
>> down. Is there a way to do a time out?
>
> Consider using the core al
On Sun, May 27, 2012 at 14:00:34 -0500 , Matt wrote:
> I have a line like this:
>
> $rststr = get("http://"; . $dst . "/request.htm" );
>
> Problem is that I have had this script hang due to the $dst site being
> down. Is there a way to do a time out?
Co
I have a line like this:
$rststr = get("http://"; . $dst . "/request.htm" );
Problem is that I have had this script hang due to the $dst site being
down. Is there a way to do a time out?
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands,
On Sun, Apr 29, 2012 at 11:10:33AM -0500, Lawrence Statton wrote:
> From perlretut, I quote:
>
>In list context, "//g" returns a list of matched groupings,
>or if there are no groupings, a list of matches to
>the whole regexp. So if we wanted just the words, we could use
On 12-04-29 10:12 PM, lina wrote:
P.S seems we don't have the same perldoc.
Try this one: http://perldoc.perl.org/
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
[updated for today's programmers]
"Show
Thanks for Lawrence's crystal clear explaination and Shawn's reply.
I understand now, best regards,
P.S seems we don't have the same perldoc.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
# $word[1] = 'dog'
# $word[2] = 'house'
(Note that the docs (at least on my copy of perl) have a typo ... it
says @words, not @word.)
So - let's take a quick pass at your problem, breaking it down into pieces.
First -
On 12-04-29 11:41 AM, lina wrote:
if($_ =~ m/cite\{(.+?)\}/g){
Not work.
while( $_ =~ m/cite\{(.+?)\}/g ){
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
[updated for today's programmers]
"Show me your
On Sun, Apr 29, 2012 at 11:26 PM, Lawrence Statton wrote:
> On 04/29/2012 10:21 AM, lina wrote:
>>
>> Hi,
>>
>> I have a text file like:
>>
>> $ more sample.tex
>>
>> aaa \cite{d1,d2},ddd \cite{e1},ccc \cite{f1,f2,f3}
>> bbb\cite{inhibitor}aaa
>>
>>
>> sub read_tex{
>> open my $fh, '<', @_;
On 04/29/2012 10:21 AM, lina wrote:
Hi,
I have a text file like:
$ more sample.tex
aaa \cite{d1,d2},ddd \cite{e1},ccc \cite{f1,f2,f3}
bbb\cite{inhibitor}aaa
sub read_tex{
open my $fh, '<', @_;
while(<$fh>){
if(/cite\{(.+?)\}/){
push @citeditems
Hi,
I have a text file like:
$ more sample.tex
aaa \cite{d1,d2},ddd \cite{e1},ccc \cite{f1,f2,f3}
bbb\cite{inhibitor}aaa
sub read_tex{
open my $fh, '<', @_;
while(<$fh>){
if(/cite\{(.+?)\}/){
push @citeditems,split/,/,$1;
}
On 04/22/2012 09:29 AM, lina wrote:
How do I use
ssh p3600 'top'
It shows me
TERM environment variable not set.
Please read the manual page for top:
$ man top
Try the "batch mode operation" and "number of iterations" options:
$ ssh p3600 top -b -n 1
HTH,
David
--
To unsubscribe,
On Sunday 22,April,2012 06:20 AM, David Christensen wrote:
On 04/21/2012 07:51 AM, lina wrote:
Thanks, I didn't realize that the ssh p3600 'do something' can do
something without being in the server.
Yes -- providing a command to ssh is a very useful. Check out the manual
page for more informa
On 04/21/2012 07:51 AM, lina wrote:
Thanks, I didn't realize that the ssh p3600 'do something' can do
something without being in the server.
Yes -- providing a command to ssh is a very useful. Check out the
manual page for more information:
$ man ssh
Taking it one step further, anythi
On Apr 20, 2012, at 5:42 AM, lina wrote:
> Hi,
>
> I used to ssh Mars (servers's name) and then cd to some directory and check
> some file's modification time.
>
> Can I do it locally with perl, without ssh?
>
> What I came so far is equal to null, but I am still google-ing.
>
> Thanks ahead
ome way to read the mtime of the file on
the remote host. If you get to the host via SSH, then you're going to
need a Perl SSH module...
As an alternative, you can use ssh from the command line to run a Perl
one-liner on a remote host (p3600) that prints the modification time of
a file (.bashrc
On 04/20/2012 05:42 AM, lina wrote:
I used to ssh Mars (servers's name) and then cd to some directory and
check some file's modification time.
Can I do it locally with perl, without ssh?
A local Perl script will need some way to read the mtime of the file on
the remote host. If
Hi,
I used to ssh Mars (servers's name) and then cd to some directory and
check some file's modification time.
Can I do it locally with perl, without ssh?
What I came so far is equal to null, but I am still google-ing.
Thanks ahead for your suggestions or template that I can work on.
Best r
On Apr 15, 2012, at 8:51 PM, Rassoul Aleshi wrote:
>
>
>
>
> Hello list managerl
>
> I am trying to get this simple peogram to call server function and return
> data and it does not work, is here anyone can help?
>
> #!/usr/bin/perl2.
> use stric
Hello list managerl
I am trying to get this simple peogram to call server function and return data
and it does not work, is here anyone can help?
#!/usr/bin/perl2.
use strict;3.
use warnings;
$i= "value";
fo
On Mon, 26 Mar 2012 20:58:43 +0200
Paul Johnson wrote:
> On Mon, Mar 26, 2012 at 06:10:08PM +0200, Manfred Lotz wrote:
> > On 25 Mar 2012 13:11:16 -
> > Peter Scott wrote:
> >
> > > On Thu, 22 Mar 2012 20:06:35 -0400, Uri Guttman wrote:
> > > > no one uses braces for single scalar handles
On Mon, Mar 26, 2012 at 06:10:08PM +0200, Manfred Lotz wrote:
> On 25 Mar 2012 13:11:16 -
> Peter Scott wrote:
>
> > On Thu, 22 Mar 2012 20:06:35 -0400, Uri Guttman wrote:
> > > no one uses braces for single scalar handles in general.
> >
> > I do. Ever since Damian recommended it (Perl Be
On 25 Mar 2012 13:11:16 -
Peter Scott wrote:
> On Thu, 22 Mar 2012 20:06:35 -0400, Uri Guttman wrote:
> > no one uses braces for single scalar handles in general.
>
> I do. Ever since Damian recommended it (Perl Best Practices, page
> 217). One of those numerous times I didn't agree with h
1 - 100 of 1466 matches
Mail list logo