Hi Folks !!!!!!!!!!!!!!!!!!!
My Requirement is.............
i have a input file:
501,501.chan
502,502.anand
503,503.biji
504,504.raja
505,505.chan
506,506.anand
507,507.chan
and my o/p should be
chan->3
i.e. the word which occurs maximum number of times in a file should be... (5 Replies)
hello everyone,
I'm trying to learn some scripts but i cant get my head around two of them.
1. how can i write a script that will count the number of times a particular word is used in file?
2. how can i make a script that will take me to a web page from unix?
if anyone could help it... (3 Replies)
Hi,
I have gone through may posts and dint find exact solution for my requirement.
I have file which consists below data and same file have lot of other data.
<MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'>
<MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
I'm trying to count the number of times each word in the file exist
for example if the file has:
today I have a lot to write, but I will not go for it. The main thing is that today I am looking for a way to get each word in this file with a word count after it specifying that this word has... (4 Replies)
hi,
Is it possible to print a particular character n number of times in a line?
for example.
i am print the following line using echo command..
echo "files successfully moved"
i want to count the number of characters that are been displayed. i am doin it using
echo "files... (8 Replies)
1. The problem statement, all variables and given/known data:
Develop a shell script that accepts a phrase and counts the number of times that it is repeated in a specific website.
Note: Im not sure if it's the whole website, or just a specific page but im guessing its thewhole website.
... (2 Replies)
Hello....
Pls help me (and sorry my english) :)
So
I have a file (test.txt) with 1 long line.... for example:
isgc jsfh udgf osff 8462 error iwzr 653 idchisfb isfbisfb sihfjfeb isfhsi gcz eifh
How to print after the "error" word the 2nd 4th 5th and 7th word??
output well be:
653 isfbisfb... (2 Replies)
Hey All,
I want want to print a string N times the number N before it.
Like i have "20 hello".
so i want to print
hello
hello
hello
.
.
.
.
. 20 times..
Please help me.. I am not able o figure out.. how to do the same? (8 Replies)
Hi,
I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file.
Ex:
$ cat "sample.log"
I am searching for a word which is present in this file
We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
LEARN ABOUT DEBIAN
mojo::base
Mojo::Base(3pm) User Contributed Perl Documentation Mojo::Base(3pm)NAME
Mojo::Base - Minimal base class for Mojo projects
SYNOPSIS
package Cat;
use Mojo::Base -base;
has 'mouse';
has paws => 4;
has [qw(ears eyes)] => 2;
package Tiger;
use Mojo::Base 'Cat';
has stripes => 42;
package main;
use Mojo::Base -strict;
my $mew = Cat->new(mouse => 'Mickey');
say $mew->paws;
say $mew->paws(5)->ears(4)->paws;
my $rawr = Tiger->new(stripes => 23);
say $rawr->ears * $rawr->stripes;
DESCRIPTION
Mojo::Base is a simple base class for Mojo projects.
# Automatically enables "strict", "warnings" and Perl 5.10 features
use Mojo::Base -strict;
use Mojo::Base -base;
use Mojo::Base 'SomeBaseClass';
All three forms save a lot of typing.
# use Mojo::Base -strict;
use strict;
use warnings;
use feature ':5.10';
# use Mojo::Base -base;
use strict;
use warnings;
use feature ':5.10';
use Mojo::Base;
push @ISA, 'Mojo::Base';
sub has { Mojo::Base::attr(__PACKAGE__, @_) }
# use Mojo::Base 'SomeBaseClass';
use strict;
use warnings;
use feature ':5.10';
require SomeBaseClass;
push @ISA, 'SomeBaseClass';
use Mojo::Base;
sub has { Mojo::Base::attr(__PACKAGE__, @_) }
FUNCTIONS
Mojo::Base exports the following functions if imported with the "-base" flag or a base class.
"has"
has 'name';
has [qw(name1 name2 name3)];
has name => 'foo';
has name => sub {...};
has [qw(name1 name2 name3)] => 'foo';
has [qw(name1 name2 name3)] => sub {...};
Create attributes, just like the "attr" method.
METHODS
Mojo::Base implements the following methods.
"new"
my $object = BaseSubClass->new;
my $object = BaseSubClass->new(name => 'value');
my $object = BaseSubClass->new({name => 'value'});
This base class provides a basic object constructor. You can pass it either a hash or a hash reference with attribute values.
"attr"
$object->attr('name');
BaseSubClass->attr('name');
BaseSubClass->attr([qw(name1 name2 name3)]);
BaseSubClass->attr(name => 'foo');
BaseSubClass->attr(name => sub {...});
BaseSubClass->attr([qw(name1 name2 name3)] => 'foo');
BaseSubClass->attr([qw(name1 name2 name3)] => sub {...});
Create attributes. An array reference can be used to create more than one attribute. Pass an optional second argument to set a default
value, it should be a constant or a sub reference. The sub reference will be excuted at accessor read time if there's no set value.
DEBUGGING
You can set the "MOJO_BASE_DEBUG" environment variable to get some advanced diagnostics information printed to "STDERR".
MOJO_BASE_DEBUG=1
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Base(3pm)