Search Results

Search: Posts Made By: brianadams
5,429
Posted By brianadams
echo RBD_EXTRAC* |perl -ne...
echo RBD_EXTRAC* |perl -ne 's/(.*_d)(.*)(\.tar.gz)/\2/;print'
1,202
Posted By brianadams
#!/usr/bin/env perl open( $fh, "<", "file")...
#!/usr/bin/env perl

open( $fh, "<", "file") or die "Cannot open file: $!\n";

while( my $line = <$fh>) {
chomp($line);
my @array = split /\s+/, $line; # split to get 3rd field
if (...
1,110
Posted By brianadams
#!/usr/bin/env perl open( $fh, "<",...
#!/usr/bin/env perl

open( $fh, "<", "yourfile") or die "Cannot open file: $!\n";
# go through the file line by line
while( my $line = <$fh>) {
chomp($line); #...
6,688
Posted By brianadams
#!/usr/bin/env perl open( $fh, "<",...
#!/usr/bin/env perl

open( $fh, "<", "yourfile") or die "Cannot open file: $!\n";

my $content = do { local $/; <$fh> }; # slurp in whole file

$content =~ s,{.*?},,smg; # remove...
4,754
Posted By brianadams
#!/usr/bin/env perl use strict; use warnings;...
#!/usr/bin/env perl
use strict;
use warnings;

while( my $line = <> ){
if ( $line =~ /Fundallinfo/ ){
$line = <>;
print $line ;
}
}
2,525
Posted By brianadams
perl -ne 'print if /TNS-(?!12514)/' yourfile
perl -ne 'print if /TNS-(?!12514)/' yourfile
4,490
Posted By brianadams
#!/usr/bin/env perl use strict; use warnings;...
#!/usr/bin/env perl
use strict;
use warnings;

while(<>){
my @sp = split(/,/ , $_);
$sp[4] = "77\n" if $sp[2] == "66" ;
print join(",", @sp);
}
915
Posted By brianadams
perl -ne '/REFDES=(.*?)\s+/ && print $1'...
perl -ne '/REFDES=(.*?)\s+/ && print $1' your_file
1,140
Posted By brianadams
#!/usr/bin/env perl use strict; use warnings;...
#!/usr/bin/env perl
use strict;
use warnings;

while(<>){
my @sp = split(/,/ , $_);
print if $sp[1] == 123456;
}
Showing results 1 to 9 of 9

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