Search Results

Search: Posts Made By: jhamaks
3,496
Posted By Akshay Hegde
Like this ? perl -ne 'print if...
Like this ?

perl -ne 'print if s/<name.*>(.*?)<\/name>/$1/g' file

OR

perl -F'<|>' -nale 'print $F[2] if $F[1] =~ /name/' file
3,496
Posted By Corona688
Make a loop to read those files line by line, and...
Make a loop to read those files line by line, and check them with that statement. It will find the name.
9,426
Posted By Lucas_0418
Do not filter the files with extensions ...
Do not filter the files with extensions

#!/usr/bin/perl -w
use warnings;
my $source_dir="/home/EDISON/test";
opendir(DIR, $source_dir) or die;
my @allfiles = grep {$_ ne '.' and $_ ne '..'...
Forum: Programming 07-30-2013
1,920
Posted By durden_tyler
$ $ cat f87 subject=...
$
$ cat f87
subject= /C=US/ST=richardson/L=richmond/O=Corp/OU=ETG/CN=cps.corporg.com/emailAddress=matt.higgins@corporate
.com
subject= /C=US/O=GeoTrust Inc./OU=Domain Validated SSL/CN=GeoTrust DV...
Forum: Programming 07-27-2013
5,916
Posted By spacebar
This is a simple example of separating them out...
This is a simple example of separating them out to separate files:
#!/usr/bin/perl -w
# Script: get_certs.pl

use strict;
use warnings;

my @a;
my $fh;
my $i;
my $p;
my $fn;

sub...
Forum: Programming 07-17-2013
5,916
Posted By achenle
This looks like it'll work: Crypt::X509 -...
This looks like it'll work:

Crypt::X509 - search.cpan.org (http://search.cpan.org/~ajung/Crypt-X509-0.51/lib/Crypt/X509.pm)
Forum: Programming 03-08-2013
1,994
Posted By elixir_sinari
open(my $myfile, '<', 'property.txt') or die...
open(my $myfile, '<', 'property.txt')
or die "Could not open property.txt: $!\n";

while(<$myfile>) {
chomp;
if(my ($var1, $var2) = /(.*?)=(.*)/) {
### do something with $var1 and $var2 ###...
Forum: Programming 03-08-2013
1,994
Posted By in2nix4life
($var1, $var2) = split(/=/, $_)
($var1, $var2) = split(/=/, $_)
Forum: Programming 03-05-2013
2,285
Posted By elixir_sinari
#!/usr/bin/perl use strict; use warnings; ...
#!/usr/bin/perl
use strict;
use warnings;

open my ($in_fh), '<', 'infile.xml'
or die "Could not open input file: $!\n";

my %certs;

while(<$in_fh>) {
push ( @{$certs{$2}}, $1) if (my...
Forum: Programming 03-01-2013
2,285
Posted By MadeInGermany
Please wrap your exsample in CODE tags! Is the...
Please wrap your exsample in CODE tags!
Is the following what you want?
perl -ne 'print if s|^<certificate FullCert="(.*)"/>|$1|' file.xml
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 11:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy