I have this script that i have written in some logging for but i do not want it to log for all option, i have used Getopt::Long 2.11 to allow differnt switches but i only want logging on one type of switch
this is my code but it does not like the ne (not equals)
i do not wnat the logging run if the -p is chosen
Hi,
I have replaced my current Intel PC machine with Solaris 10, it use to have windows XP.
I am sure alot of people already done this and i have seen Solaris running smoothly but having keyboard problem.
What is the equal keys in a QWERTY keyboard for selection <Stop+A> ?
Is there a... (5 Replies)
Hi,
I have the below script executed
arg="dir"
if "$arg" = "dir"
then
echo "true"
else
echo "false"
fi
Please let me know what happens in the if command.
My output is:
dir: dir: No such file or directory
false
which is not the desired output.
When i used test command... (1 Reply)
Does anybody understand why this is not being interpreted as true.
Script:
#!/bin/bash
errored=`grep "errored" new_update_scripts.txt`
echo $errored = "errored"
if ; then
echo true
else
echo false
fi
Output:
$ UpdateScripts
errored = errored
false (7 Replies)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Guys,
I am trying to do below operation
LAST_TRANSACTION=2
if ]; then
# do something
fi
If the LAST_TRANSACTION variable is not equal to 1 or 2 or 3 then code inside the if block should be execute.
This code is not working, Any help is appreciated. (7 Replies)
How do I go about amending this simple script that prompts for a yes/no response so that if neither Y or N are entered it will loop back back to the original prompt
#!/bin/ksh
echo "Enter yes of no"
read answer
if
then
echo "You selected yes"
elif
then
echo "You selected no"
elif... (5 Replies)
Hi there can anyone help me please. I want to make a program to check if the executable file specified by the user exists in the directory.
When I run this program particulary these lines of code does not work:
if ("$fi" == "$name") then where It checks whether the specified file is equal to the... (1 Reply)
Did I do something wrong with this awk not equal? For some reason it prints twice.
>awk '{if ($4 != "root") print $1 " " $4 " " $5}' ls_test
server10: njs nodeadm
server10: njs nodeadm
>grep server10 ls_test
server10: drwxr-sr-x. 18 njs nodeadm 4096 Aug 16 09:42 /opt
> (2 Replies)
Discussion started by: cokedude
2 Replies
LEARN ABOUT DEBIAN
moosex::getopt::gld
MooseX::Getopt::GLD(3pm) User Contributed Perl Documentation MooseX::Getopt::GLD(3pm)NAME
MooseX::Getopt::GLD - A Moose role for processing command line options with Getopt::Long::Descriptive
SYNOPSIS
## In your class
package My::App;
use Moose;
with 'MooseX::Getopt::GLD';
# or
with 'MooseX::Getopt::GLD' => { getopt_conf => [ 'pass_through', ... ] };
has 'out' => (is => 'rw', isa => 'Str', required => 1);
has 'in' => (is => 'rw', isa => 'Str', required => 1);
# ... rest of the class here
## in your script
#!/usr/bin/perl
use My::App;
my $app = My::App->new_with_options();
# ... rest of the script here
## on the command line
% perl my_app_script.pl -in file.input -out file.dump
OPTIONS
This role is a parameterized role. It accepts one configuration parameter, "getopt_conf". This parameter is an ArrayRef of strings, which
are Getopt::Long configuraion options (see "Configuring Getopt::Long" in Getopt::Long)
AUTHORS
o Stevan Little <stevan@iinteractive.com>
o Brandon L. Black <blblack@gmail.com>
o Yuval Kogman <nothingmuch@woobling.org>
o Ryan D Johnson <ryan@innerfence.com>
o Drew Taylor <drew@drewtaylor.com>
o Tomas Doran <bobtfish@bobtfish.net>
o Florian Ragwitz <rafl@debian.org>
o Dagfinn Ilmari Mannsaker <ilmari@ilmari.org>
o AEvar Arnfjoro Bjarmason <avar@cpan.org>
o Chris Prather <perigrin@cpan.org>
o Karen Etheridge <ether@cpan.org>
o Jonathan Swartz <swartz@pobox.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc.
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-05-13 MooseX::Getopt::GLD(3pm)