Want to flex your scripting skills? Also want a chance to win awesome prizes? If so, you should compete in Linux Showdown 8: “The Assembler” that TrueAbility is hosting!
TrueAbility was built with tech professionals in mind and has a vast community of Linux members. Everything from Linux challenges and self-assessments, to blog posts and Linux jobs can be found at TrueAbility.
We are launching an old school challenge to test tech pros' scripting skills and they are calling it their most difficult challenge EVER. It goes live on March 16th, so you have a few days to brush up your Hardware Programming Language: Assembly. The top 50 techs will advance to an even more challenging round 2.
Think you have what it takes to make it on their leaderboard and advance to round 2?
Lots of prizes are going to be given away! They range from Linux Foundation Certified Engineer Exam credits and TrueAbility Abilityscreens to DigitalOcean credits and even a D-Link AC3200 Ultra Wi-Fi Router. It doesn't cost anything to join in on the fun. Prove what you've got while winning awesome prizes. You won't want to miss this!
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Config::MVP::Assembler::WithBundles(3pm) User Contributed Perl Documentation Config::MVP::Assembler::WithBundles(3pm)NAME
Config::MVP::Assembler::WithBundles - a role to make assemblers expand bundles
VERSION
version 2.200002
DESCRIPTION
Config::MVP::Assembler::WithBundles is a role to be composed into a Config::MVP::Assembler subclass. It allows some sections of
configuration to be treated as bundles. When any section is ended, if that section represented a bundle, its bundle contents will be
unrolled and will replace it in the sequence.
A package is considered a bundle if the this returns a defined method:
my $method = $assembler->package_bundle_method($package);
The default implementation looks for a method callde "mvp_bundle_config", but "package_bundle_method" can be replaced to allow for other
bundle-identifying information.
Bundles are expanded by a call to the assembler's "replace_bundle_with_contents" method, like this:
$assembler->replace_bundle_with_contents($section, $method);
replace_bundle_with_contents
The default "replace_bundle_with_contents" method deletes the section from the sequence. It then gets a description of the new sections to
introduce, like this:
my @new_config = $bundle_section->package->$method({
name => $bundle_section->name,
package => $bundle_section->package,
payload => $bundle_section->payload,
});
(We pass a hashref rather than a section so that bundles can be expanded synthetically without having to laboriously create a new Section.)
The returned @new_config is a list of arrayrefs, each of which has three entries:
[ $name, $package, $payload ]
Each arrayref is converted into a section in the sequence. The $payload should be an arrayref of name/value pairs to be added to the
created section.
AUTHOR
Ricardo Signes <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-03-16 Config::MVP::Assembler::WithBundles(3pm)