Thanks for reply.
(URL deleted - not allowed ) It never occurred to me that case returns value.
I'll follow you suggestions after I post this.
I am modifying "standard" configuration file to make sense of WiFi errors I am getting.
I am not too concerned if the file is perfect, I just need to make my modifications for now.
Would it be feasible to implement something like this - in pseudocode ?
When I gain some more experience I would like to make the "|| command " as a function passing the error number (?) and the variable message to it.
It can get very annoying that bash regex =~ is case-sensetive, is there a way to set it to be case-insensetive?
if ]; then
echo match
else
echo no match
fi (8 Replies)
greetings,
I have a script that is taking input like this:
a
b
c
d
aa
bb
aaa
bbb
ccc
ddd
and formating it to be like this:
a b c d
aa bb
aaa bbb ccc ddd (4 Replies)
Is there any inbuilt functionality in Unix shell script so that i can able to convert lower case string input to an upper case?
I dont want to use high level languages like java,python or perl for doing the job. (2 Replies)
I'm pretty sure I already know the answer to this, but I want to make sure I'm not overlooking anything. I'm working on a log monitoring script and every 10 lines I want to display a summary of events. The thing is, there are a lot of possible events, that likely won't have happened, so I only want... (0 Replies)
I have the following bash script and it is not accepting the lines
"--"|"--""-")
"--""-"")
while
do
echo "Current Argument is ${1}"
case "$1" in
"--"|"--""-")
echo "Argument is ${1}"
shift # Skip ahead one to the next argument.
... (1 Reply)
Hello All,
I am writing a script that is to be placed on multiple servers, and of course I've started
running into some compatibility issues for certain shell commands.
The code below worked just fine on most of my machines except for a couple.
Here I had 4 separate lines in my script that... (3 Replies)
Hi,
I'm having some trouble with using "case...esac" in Bash.
I've googled it and am stuggling to understand the syntax and how to do certain things.
Firstly, I want to be able to choose a case based on a variable number
For example, I have in my code a place where a user can enter... (2 Replies)
Hi Gurus,
I have the below BASH code which does not works for upper case alphabets except Z (upper case Z).
What may be the reason. Also escape sequences like \n, \t, \b, \033(1m \033(0m (For bold letter) are not working.
case $var in
)
echo "Lower case alphabet"
;;
... (7 Replies)
In the bash menu below if the variant that is inputted is in the format NM_004004.3:c.274G>T the below works perfectly. My question is if the variant inputted isNM_004004.3:-c.274G>T or NM_004004.3:+c.274G>T then the code as is will throw an error due to a biological issue. Is it possible to to... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT DEBIAN
test::moose
Test::Moose(3pm) User Contributed Perl Documentation Test::Moose(3pm)NAME
Test::Moose - Test functions for Moose specific features
VERSION
version 2.0603
SYNOPSIS
use Test::More plan => 1;
use Test::Moose;
meta_ok($class_or_obj, "... Foo has a ->meta");
does_ok($class_or_obj, $role, "... Foo does the Baz role");
has_attribute_ok($class_or_obj, $attr_name, "... Foo has the 'bar' attribute");
DESCRIPTION
This module provides some useful test functions for Moose based classes. It is an experimental first release, so comments and suggestions
are very welcome.
EXPORTED FUNCTIONS
meta_ok ($class_or_object)
Tests if a class or object has a metaclass.
does_ok ($class_or_object, $role, ?$message)
Tests if a class or object does a certain role, similar to what "isa_ok" does for the "isa" method.
has_attribute_ok($class_or_object, $attr_name, ?$message)
Tests if a class or object has a certain attribute, similar to what "can_ok" does for the methods.
with_immutable { CODE } @class_names
Runs CODE (which should contain normal tests) twice, and make each class in @class_names immutable in between the two runs.
TODO
Convert the Moose test suite to use this module.
Here is a list of possible functions to write
immutability predicates
anon-class predicates
discovering original method from modified method
attribute metaclass predicates (attribute_isa?)
SEE ALSO
Test::More
BUGS
See "BUGS" in Moose for details on reporting bugs.
AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for
details.
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-06-28 Test::Moose(3pm)