You could look into using grep instead of the second for loop. I probably would be more efficient then a shell for loop, and it would help eliminate a few lines.
Hi,
I have this following script below. Its searching a log file for 2 string and if found then write the strings to success.txt and If not found write strings to failed.txt . if one found and not other...then write found to success.txt and not found to failed.txt.
I want to optimize this... (3 Replies)
can we optimize this command ?
sed 's#AAAA##g' /study/i.txt | sed '1,2d' | tr -d '\n\' > /study/i1.txt;
as here i am using two files ...its overhead..can we optimise to use only 1 file
sed 's#AAAA##g' /study/i.txt | sed '1,2d' | tr -d '\n\' > /study/i.txt;
keeping them same but it... (9 Replies)
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
my $date_converted = UnixDate(ParseDate("3 days ago"),"%e/%h/%Y");
open FILE,">$ARGV";
while(<DATA>){
my @tab_delimited_array = split(/\t/,$_);
$tab_delimited_array =~ s/^\ =~ s/^\-//;
my $converted_date =... (2 Replies)
Hi,
I have to assign a value for a varaiable based on a Input. I have written the below code:
if
then
nf=65
elif
then
nf=46
elif
then
nf=164
elif
then
nf=545
elif
then
nf=56
elif
then (3 Replies)
Here is my code. What it does is it reads an input file (input.txt which contains roughly 2,000 search phrases) and searches a directory for files that contains the search phrase. The directory contains roughly 1900 files and 84 subdirectories. The output is a file (output.txt) that shows only the... (23 Replies)
Hello,
I'm wondering if there is a quicker way of doing this.
Here is my mv script.
d=/conversion/program/out
cd $d
ls $d > /home/tempuser/$$tmp
while read line ; do
a=`echo $line|cut -c1-5|sed "s/_//g"`
b=`echo $line|cut -c16-21`
if ;then mkdir... (13 Replies)
Hi guys,
I feel a bit comfortable now doing bash scripting but I am worried that the way I do it is not optimized and I can do much better as to how I code.
e.g.
I have a whole line in a file from which I want to extract some values.
Right now what I am doing is :
STATE=`cat... (5 Replies)
Hi All,
I have written a new script to check for DB space and size of dump log file before it can be imported into a Oracle DB.
I'm relatively new to shell scripting.
Please help me optimize this script further. (0 Replies)
Discussion started by: narayanv
0 Replies
LEARN ABOUT DEBIAN
mojolicious::command::generate::makefile
Mojolicious::Command::generate::makefile(3pm) User Contributed Perl Documentation Mojolicious::Command::generate::makefile(3pm)NAME
Mojolicious::Command::generate::makefile - Makefile generator command
SYNOPSIS
use Mojolicious::Command::generate::makefile;
my $makefile = Mojolicious::Command::generate::makefile->new;
$makefile->run(@ARGV);
DESCRIPTION
Mojolicious::Command::generate::makefile generates "Makefile.PL" files for applications.
ATTRIBUTES
Mojolicious::Command::generate::makefile inherits all attributes from Mojo::Command and implements the following new ones.
"description"
my $description = $makefile->description;
$makefile = $makefile->description('Foo!');
Short description of this command, used for the command list.
"usage"
my $usage = $makefile->usage;
$makefile = $makefile->usage('Foo!');
Usage information for this command, used for the help screen.
METHODS
Mojolicious::Command::generate::makefile inherits all methods from Mojo::Command and implements the following new ones.
"run"
$makefile->run(@ARGV);
Run this command.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojolicious::Command::generate::makefile(3pm)