hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Hi
I have strings like these :
Vengeance mitt
Men Vengeance gloves
Women Quatro Windstopper Etip gloves
Quatro Windstopper Etip gloves
Girls Thermobite hooded jacket
Thermobite Triclimate snow jacket
Boys Thermobite Triclimate snow jacket
and I would like to get the lower case words at... (2 Replies)
Hello,
I would like to change my setting in a file to the setting that user input.
For example, by default it is
ONBOOT=ON
When user key in "YES", it would be
ONBOOT=YES
--------------
This code only adds in the entire user input, but didn't replace it.
How do i go about... (5 Replies)
Hi there, newbie there. I've been browsing the forums hoping to find a solution that answers a problem similar to what I need, but haven't had much luck. Any help would be greatly appreciated. Thanks!
I need to delete a bunch of text between every appearance of two words in a really large file... (3 Replies)
hi,
i need to replace all words in any quote position and then need to change the words inside the file thousand of raw.
textfile data :
"Ninguno","Confirma","JuicioABC"
"JuicioCOMP","Recurso","JuicioABC"
"JuicioDELL","Nulidad","Nosino"
"Solidade","JuicioEUR","Segundo"
need... (1 Reply)
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
File 1 contains the list of words that needed to be randomly paired:
Tiger
Cat
Fish
Frog
Dog
Mouse
Elephant
Monkey
File 2 contains the pairs that should not be used (in any solution) during random pairing.
Elephant-Dog
Cat-Fish
Monkey-Frog
Dog-Elephant, Fish-Cat, Frog-Monkey... (1 Reply)
Discussion started by: sammy777888
1 Replies
LEARN ABOUT DEBIAN
mojo::collection
Mojo::Collection(3pm) User Contributed Perl Documentation Mojo::Collection(3pm)NAME
Mojo::Collection - Collection
SYNOPSIS
# Manipulate collections
use Mojo::Collection;
my $collection = Mojo::Collection->new(qw(just works));
unshift @$collection, 'it';
$collection->map(sub { ucfirst })->each(sub {
my ($word, $count) = @_;
say "$count: $word";
});
# Use the alternative constructor
use Mojo::Collection 'c';
c(qw(a b c))->join('/')->url_escape->say;
DESCRIPTION
Mojo::Collection is a container for collections.
FUNCTIONS
Mojo::Collection implements the following functions.
"c"
my $collection = c(1, 2, 3);
Construct a new Mojo::Collection object.
METHODS
Mojo::Collection implements the following methods.
"new"
my $collection = Mojo::Collection->new(1, 2, 3);
Construct a new Mojo::Collection object.
"each"
my @elements = $collection->each;
$collection = $collection->each(sub {...});
Evaluate closure for each element in collection.
$collection->each(sub {
my ($e, $count) = @_;
say "$count: $e";
});
"first"
my $first = $collection->first;
my $first = $collection->first(sub {...});
Evaluate closure for each element in collection and return the first one for which the closure returns true.
my $five = $collection->first(sub { $_ == 5 });
"grep"
my $new = $collection->grep(sub {...});
Evaluate closure for each element in collection and create a new collection with all elements for which the closure returned true.
my $interesting = $collection->grep(sub { /mojo/i });
"join"
my $stream = $collection->join("
");
Turn collection into Mojo::ByteStream.
$collection->join("
")->say;
"map"
my $new = $collection->map(sub {...});
Evaluate closure for each element in collection and create a new collection from the results.
my $doubled = $collection->map(sub { $_ * 2 });
"reverse"
my $new = $collection->reverse;
Create a new collection with all elements in reverse order.
"slice"
my $new = $collection->slice(4 .. 7);
Create a new collection with all selected elements.
"shuffle"
my $new = $collection->shuffle;
Create a new collection with all elements in random order.
"size"
my $size = $collection->size;
Number of elements in collection.
"sort"
my $new = $collection->sort;
my $new = $collection->sort(sub {...});
Sort elements based on return value of closure and create a new collection from the results.
my $insensitive = $collection->sort(sub { uc(shift) cmp uc(shift) });
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Collection(3pm)