INPUT="123456"
case $INPUT in
( +([[:digit:]]) ) echo "INPUT is all numbers" ;;
*) echo "INPUT is not all numbers" ;;
esac
INPUT="a123456"
case $INPUT in
( +([[:digit:]]) ) echo "INPUT is all numbers" ;;
*) echo "INPUT is not all numbers" ;;
esac
I'm tryning to do something like this,
I have this file:
spaces12tabgoodbye
spaces3tabhello
I want to copy to another file the lines that have the number above 10...
I thought using sort -rn but I don't know how to discard the lines that have the number below 10.
Any idea?
Thanks (3 Replies)
I need to distinguish between numerical characters in a script:
echo "Enter a number."
read num
if (( $num = * )) ; then
exit 0
fi
this RegX does not work.
Any suggestions? (5 Replies)
Hi, All,
I want to calculate a specific value of a Gaussian distribution, say the mean is a=3, variance is b=5, the indepentent variable is x=2, how could I get the y which is the Gaussian distribution value of x.
Thanks,
Jenny (1 Reply)
Say for example I have a list of numbers..
5
10
13
48
1
could I use grep to show only those numbers that are above 10? For various reasons I can only use grep... not awk or sed etc. (7 Replies)
Hi
I have a variable which should be any number between 1 and 50.
It could also be any string/empty string.
I have a code written below. The point is when the variable contains string.
I don't want the code below to error out. Instead fall in the else bucket.
&& dothis_1 || dothis_2 (1 Reply)
Hi,
Hope someone can shed some light on this...
I have two lists of numbers I am comparing using COMM. If the first list is empty, and I sort both lists like so:
DIFF=`comm -3 <(echo "$EMPTY" | sort -n) <(echo "$NUMBERS" | sort -n)`I get the error: comm: file 2 is not in sorted order
But... (2 Replies)
Hi,
I have been working on this problem, but could only get so far. I have a file that looks like this
(cat,chimp,(((dog,cat,cow),orangutan),((horse,((cat,dog),(cow,pig))),cat,mouse,rat)));
I would like after each instance of the word 'cat' to have an incrementing numerical label.
I... (5 Replies)
Hi,
I have a large number of files which are named as follows.
VF_50, VF_100, VF_150, VF_250, VF_300, VF_350, VF_400, VF_450, VF_500.
When I do an 'ls' it arranges the files in the following way
VF_100, VF_150, VF_250, VF_300, VF_350, VF_400, VF_450, VF_50, VF_500.
Is there a way to... (2 Replies)
I'm new to Unix and I have been trying to fix this problem for the past week.
How would I use grep to display only certain numbers for a list. For example, if I have this list:
Joe senior 4/50
John junior 25/50
Mary junior 41/50
Martha sophomore 2/50
...How do I get a file... (1 Reply)
Hello Team,
I need bash script to check if my output is non numerical or empty. if its then my output should display default value as 0
basically, I am reading value from txt file. most of numerical value, in case there is no numerical value or its empty, then my output should be 0.
... (5 Replies)
Discussion started by: ghpradeep
5 Replies
LEARN ABOUT DEBIAN
xml::validate::base
XML::Validate::Base(3pm) User Contributed Perl Documentation XML::Validate::Base(3pm)NAME
XML::Validate::Base - Abstract base class to be used by XML::Validate modules
SYNOPSIS
use XML::Validate::Base;
sub new {
... override new ...
}
sub validate {
... override validate ...
}
DESCRIPTION
XML::Validate::Base provides a base class with helpful subs for real XML::Validate modules.
METHODS
new(%options)
Constructs a new validator. This method must be overridden.
validate($xml)
Parses and validates $xml. Returns a true value on success, undef on failure. This method must be overridden.
options
An accessor for the options hashref.
set_options($supplied_options,$valid_options)
Sets the options for the validator. $supplied_options and $valid_options are hash refs containing respectively the options supplied to
the constructor and the valid options for validator along with their default values.
If the supplied options hash ref contains an option not listed in valid options, this sub throws an exception.
last_error
Returns the error from the last validate call. This is a hash ref with the following fields:
o message
o line
o column
Note that the error gets cleared at the beginning of each "validate" call.
add_error($error)
Stores $error for retrieval by last_error. $error should be a hash ref.
clear_errors
Clears any errors held by the validator.
VERSION
$Revision: 1.9 $ on $Date: 2005/09/06 11:05:08 $ by $Author: johna $
AUTHOR
Colin Robertson <cpan _at_ bbc _dot_ co _dot_ uk>
COPYRIGHT
(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL. See the file COPYING in this
distribution, or http://www.gnu.org/licenses/gpl.txt
perl v5.10.1 2006-04-19 XML::Validate::Base(3pm)