Search Results

Search: Posts Made By: giridhar276
5,538
Posted By rbatte1
Is this the module Data::Dumper? If so, you...
Is this the module Data::Dumper?

If so, you might do better with:-#!/usr/bin/perl
use Data::Dumper ;
:
: # Whatever else you need to do
:
:
print Dumper($variable) ;

is this what...
7,556
Posted By balajesuri
My best guess is that you've installed Active...
My best guess is that you've installed Active State's ActivePerl. In that case, look for "Perl Package Manager" in perl's installation directory. Installing modules using perl package manager is a...
1,758
Posted By elixir_sinari
One way: #!/usr/bin/perl use warnings; use...
One way:
#!/usr/bin/perl
use warnings;
use strict;

my $str1 = "41148,,,,,,,,,,,,,,,,,,,,,,,,";
my $date = "TUE 08-28-2012";

print "Before : $str1\n";
my @temp = split /,/, $str1, -1;...
7,786
Posted By balajesuri
Here's a suggestion - Since you've already gone...
Here's a suggestion - Since you've already gone through Spreadsheet::XLSX; as you read each cell, write them to an xls file using Spreadsheet::WriteExcel module. So, read each cell from .xlsx file...
6,579
Posted By Skrynesaver
I haven't used Net::Traceroute on windows,...
I haven't used Net::Traceroute on windows, however the traceroute executable on windows is called tracert. You can specify the trace_program in the constructor so that the declaration of $tr becomes...
1,797
Posted By rangarasan
Hi, what about this..? my...
Hi,

what about this..?


my $data="Created By = sripathi Server Name = dysp001 time = Tue Aug 7 03:54:12 2012 Node = mumgwmpls2335.net.hca.com";
if($data=~/aug/i){
$res=$data;
...
3,486
Posted By balajesuri
$^I enables in-file editing. ".orig" will be the...
$^I enables in-file editing. ".orig" will be the extension added to original file and kept in the same directory. So after in-file editing "abc.html" would be retained as "abc.html.orig" in the same...
3,486
Posted By balajesuri
my $filename = "theme1.htm"; my $old = "Hello";...
my $filename = "theme1.htm";
my $old = "Hello";
my $new = "Giridhar";
$new = "$old ".$new;

$^I = ".orig";
$ARGV[0] = $filename;

while( <> )
{
s/$old/$new/;
print;
}
2,992
Posted By balajesuri
@guruprasadpr: Option n is not required if p is...
@guruprasadpr: Option n is not required if p is used. In crude terms, Option p = Option n + print.

@giridhar276:Here's a bash script:
#! /bin/bash

for htmlFile in *.html
do
sed -i...
1,756
Posted By itkamaraj
$ perl -F, -lane...
$ perl -F, -lane 'foreach(@F){$i++;if($i%4!=0){printf("%s,",$_)}else{print $_ .","}}' input.txt
196237,ram,25-May-06,ram.kiran@xyz.com,
204183,Pavan,4-Jun-07,Pavan.Desai@xyz.com,
237107,ram...
2,992
Posted By guruprasadpr
Hi $ perl -pne 's/Hello/Hello Giridhar/...
Hi

$ perl -pne 's/Hello/Hello Giridhar/ if($.==8)' file

Guru
2,591
Posted By Smiling Dragon
Perhaps start by checking that works when you do...
Perhaps start by checking that works when you do it via a telnet localhost 25 and/or running sendmail direct form the commandline.
Also, check the system mail logs to see if the message is getting...
3,831
Posted By itkamaraj
in that case, redirect all the ouput of second...
in that case, redirect all the ouput of second script to some file and once it got executed, read the file in your first script and do the necessary action.

otherwise, refer this post

ipc -...
2,695
Posted By bmk
In unix.. try like... echo "theme1.htm" | tr...
In unix..
try like...
echo "theme1.htm" | tr -dc '[0-9]'
2,695
Posted By itkamaraj
#!/bin/perl $var="theme108.htm"; ...
#!/bin/perl
$var="theme108.htm";
$var=~m/theme(\d+).htm/;
$anothervar=$1;
print $anothervar;
2,695
Posted By itkamaraj
$ echo "theme3.htm" | perl -lane...
$ echo "theme3.htm" | perl -lane 's/theme(\d+).htm/$1/;print $_'
3
$ echo "theme150.htm" | perl -lane 's/theme(\d+).htm/$1/;print $_'
150
63,534
Posted By methyl
The "ctime" timestamp is rarely of any use. Some...
The "ctime" timestamp is rarely of any use. Some backup software changes it after backing up files. It also changes if you change the permissions of the file.
Stick to "mtime" for this purpose.
...
63,534
Posted By Corona688
It isn't? What's ctime then? ctime is updated...
It isn't? What's ctime then? ctime is updated by chmod and chown, but is still much closer than mtime, which changes every time you change the file in any manner...

Modifying CarloM's idea...
63,534
Posted By verdepollo
Keep in mind that the creation time is not really...
Keep in mind that the creation time is not really stored in the inode so you may get false positives.

Files that were created somewhere in the past but were modified today will also match your...
63,534
Posted By CarloM
Try ls -latr *.txt | grep "$(date '+%b...
Try
ls -latr *.txt | grep "$(date '+%b %e')"
2,265
Posted By jayan_jay
Displaying the files are in vertical. Hence while...
Displaying the files are in vertical. Hence while ftping, it ends with an error.

Try with the below one..

SOURCE_FILE=$(ls -rt EXCEL_QUALITY*.xls |tail -3 | xargs)
Showing results 1 to 21 of 21

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