hi need help here, a bit of code im doing requires a number to be enetered i have got validation and loop if its outside a ceratain range, but was wondering what code i need to validate if a character has been entered. cheers (3 Replies)
Hello all,
I am having problem in writing a if condition for the following:
I have a file Instance.dat which has:
#Server Environment
server1 dev
server2 dev
server3 sit
#!/bin/ksh
ENV=dev
for i in $( cat Instances.dat | grep -v '#' |awk {'print $2'} )
do
if ]... (7 Replies)
Dear guru's,
I am learning shellscripting and now I 'm struggeling with this problem:
When the number in the left column is equal or higer then 200, I want to send an email to "postmaster" @ the corresponding domain in the right column.
220 shoes.com
217 dishwashers.net
209 ... (11 Replies)
hi
I need a simple script to do the following.
I need to check the user input for
1. quad dotted notation.
2. check that all of the inputs are numeric and within 1-255 range.
Could someone please help me?
I tried to use egrep to check for dotted notation.
quad=1.1.1.12
... (5 Replies)
the user inputs names that have to be inside square brackets
I want to check if the user puts the brackets and if not ask him to re-enter the names (9 Replies)
Hi,
i am trying to validate 2 variables and then subtract, the following code works well in AiX but when i try in Solaris it doesnt work.
((TIME1>TIME2)) && ((TIME2=TIME2+864))
((DIF=TIME2-TIME1))
echo difference = $DIF Seconds
is there any way the validation can be done using... (2 Replies)
How do we validate the header file. The file number should increament by 1 (position 17 to 19) if not abend the process.
first week
ABC0001 20100101123
second week
ABC0001 20100108124
Third week
ABC0001 20100115125 (7 Replies)
I have a table that looks like this, but for a whole year:
Hourly weather history for XXX 7 Jun
0:00 Clear weather 28
1:00 Clear weather 23
2:00 Clear weather 21
3:00 Clear weather 22
4:00 Clear weather 22
5:00 Clear weather 22
6:00 Clear weather 23
7:00 Clear... (12 Replies)
How to validate the user supplied timestamp?
Ther requirement is as follows.
While invoking the script, the parameters passed to the script are minimum and maixmum timestamps.
let's say min_tstmp and max_tstmp
ksh abc.ksh 2011-09-01-00:00:00 2011-12-01-00:00:00
so... (3 Replies)
Hi Guys,
Im a newbie to scripting and have a small assignment. can someone please confirm if the script i have written would work fine as we dont have a test server to test :(
Scenario - copy 2 files from an ftp server (windows) to a linux machine (a perticular folder). run 2 different... (0 Replies)
Discussion started by: nishantvshah
0 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)