Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: karthigayan
1,448
Posted By karthigayan
In perl, #!/usr/bin/perl use...
In perl,


#!/usr/bin/perl
use Data::Dumper;

my %Hash = () ;
my ($fh , $mon , $name );
open $fh ,"<file" or die "Can not open the file : $@";

while ( <$fh> ) {
($mon , $name ) =...
2,214
Posted By karthigayan
.[0-9][0-9] matching the file AB940Insert.xml.
.[0-9][0-9] matching the file AB940Insert.xml.
1,318
Posted By karthigayan
Explain your question clearly.
Explain your question clearly.
1,134
Posted By karthigayan
Try this, var="25x24"; first=`echo $var...
Try this,


var="25x24";
first=`echo $var | cut -d 'x' -f 1`
second=`echo $var | cut -d 'x' -f 2`
let result=$first*$second;
echo $result;
3,018
Posted By karthigayan
Try this !
Try this ,


while read line
do
if [[ $line == *\/data\/* ]]
then
echo `sed -r "s/\/data\//\/newdata\//g" <<<$line`
elif [[ $line == *\/newdata\/* ]]...
761
Posted By karthigayan
Try this shell script , #!/bin/bash ...
Try this shell script ,


#!/bin/bash
while read line1
do
match=0
while read line2
do
if [ $line1 == $line2 ]; then
match=1...
3,414
Posted By karthigayan
date -d '10 hours'
date -d '10 hours'
1,110
Posted By karthigayan
Check the permission of the script . The script...
Check the permission of the script . The script should have executable permission.
2,573
Posted By karthigayan
Launching a process in remote machine
Hi all,
Normally to launch a process in the remote machine I will use ssh to the machine and launch the process.I want to launch the remote machine process with out login into the machine...
2,304
Posted By karthigayan
can you give the sample output .
can you give the sample output .
5,691
Posted By karthigayan
Need perl regular expression to remove the comment
I need a perl substitution to remove only the comment in the line . That line may have '#' with in double quotes .I used the following ,


s/(^.*\".+?#.+?\".+?)(#.*)/$1/g


It works for ,

...
1,667
Posted By karthigayan
Unable to get the mounted files in .gvfs
I am using ubuntu and I used to mount the remote machine directory using the menu 'Places -> Connect to Server' . And I will use SSH as service type.

Usually the mounted files will available in...
944
Posted By karthigayan
After adding this in .vimrc it's working . thanks
After adding this in .vimrc it's working . thanks
944
Posted By karthigayan
plug in for syn on
I am using vim version 7.1.314.It don't have syn on.Is there any plug in available for syn on or I have to update the version.
2,880
Posted By karthigayan
Try this , my $current = time; my...
Try this ,


my $current = time;
my $sevendays = $current - (7*24*60*60);
3,196
Posted By karthigayan
I know Data:: Dumper.I asked the way for...
I know Data:: Dumper.I asked the way for traversing .
3,196
Posted By karthigayan
No . The array reference may contain some array...
No . The array reference may contain some array references and those references may contain some and so on .So I need to traverse the all the levels and print the data.
1,299
Posted By karthigayan
Try this, mark=0; sentence="Replace the...
Try this,


mark=0;
sentence="Replace the text"

while read line
do
if [ "$line" == "<file1>" ] ;then
echo $line
mark=1;
elif [ "$line" ==...
3,196
Posted By karthigayan
Perl nested array problem
I have a array reference which has some number of array references inside it.The nested array references also contains the array references.


my $Filename = "sample.xml";

my $Parser = new...
6,167
Posted By karthigayan
Use the {} to match the number of character...
Use the {} to match the number of character occurence before the pattern ,


sed -r "s/^.{15}RAJESH/REPLACE/g"
1,202
Posted By karthigayan
Actually there is no need for the inner double...
Actually there is no need for the inner double quote .


system("wget http://ip/sw?s=1");
21,154
Posted By karthigayan
Try this , str3=$(echo "$str1 \n $str2") ...
Try this ,


str3=$(echo "$str1 \n $str2")
echo -e $str3
2,160
Posted By karthigayan
Perl solution , use strict; use...
Perl solution ,


use strict;
use warnings;

open FILE,"<file";

foreach ( <FILE> ) {
if ( /^seqno/i ) {
print $_ ;
next ;
}
if ( /^[0-9].+"$/ ) {
...
1,550
Posted By karthigayan
use '\b' to match the end of the number , ...
use '\b' to match the end of the number ,


[0-9]+0\b
1,480
Posted By karthigayan
solution
Is this the code you are trying ,


#!/usr/bin/perl

use strict;
use warnings;

my $start = "14:23";
my $end = "14:30";
my $ind = 0;
my @arr;
my $result = 0;
open FILE,"<file";
while (...
Showing results 1 to 25 of 137

 

Featured Tech Videos

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