Sponsored Content
Full Discussion: How to validate input values
Top Forums Shell Programming and Scripting How to validate input values Post 302123732 by SasDutta on Wednesday 27th of June 2007 02:16:27 AM
Old 06-27-2007
Quote:
Originally Posted by aigles
Can you give us the valid formats for
  • number : integer, signed, float ?
  • date : dd/mm/YYYY, mm/dd/YYYY, dd-MMM-YYYY, YYYYmmdd ?
  • string : letters, upper/lower case, special chars allowed ?
Hi

number : integer, signed, float ?Any valid number.No character will be allowed
date : dd/mm/YYYY, mm/dd/YYYY, dd-MMM-YYYY, YYYYmmdd ?Any valid date
string : letters, upper/lower case, special chars allowed ?Any string.No date allowed.Numbers can be allowed.

Regds
Sas
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

validate input from user for file name

Hello, This may have been addressed already somewhere, however I am looking for the easiest/shortest way to validate a response from a user for a file name. The file name should not have any of the following characters ~`!@#$%^&*()_-+={|\:;"'<,>.?/ Further the response should not have any... (2 Replies)
Discussion started by: jerardfjay
2 Replies

2. Shell Programming and Scripting

Need to validate a date input format

Hi all, I have a shell script(K shell) which takes a date as input. i want the input to be in DD-MM-YYYY format. Can i enforce such a format of input string using just one line of code? OR do i need to parse the input date into different components and test them using Case statements... (2 Replies)
Discussion started by: rajugp1
2 Replies

3. Shell Programming and Scripting

validate input

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)
Discussion started by: DDoS
9 Replies

4. UNIX for Dummies Questions & Answers

BASH validate user input

Hey, im trying to validate a user input and need some help. The input needs to be just a single letter. Im using a case to so this eg: read answer case $answer in *) echo "OK" ;; *) echo "This is a number" read answer ;; *) echo... (2 Replies)
Discussion started by: 602chrislys
2 Replies

5. Shell Programming and Scripting

Validate and sort input

Hi, This will most likely be a simple answer. Currently I have a situation where my script will be sent various options: -o1 -o2 -oe3@somthing.com Now, if I want to run a certain command based on the option I am sent, I am doing the following. for o in $(echo $options) do if ... (3 Replies)
Discussion started by: stuaz
3 Replies

6. Shell Programming and Scripting

How to validate input parameters?

Hi, I wonder how I can know if the input parameters to the script are numbers or text Thanks (11 Replies)
Discussion started by: Gengis-Kahn
11 Replies

7. Shell Programming and Scripting

Another validate input Question.

I'm writing a bash shell script to 'help' me post to susepaste (I can NEVER remember the time options). Here's the code: #!/bin/bash ########## # # Project : personal script. # Started : Wed Aug 03, 2011 # Author : Habitual # Description : susepaste c-li script with user... (5 Replies)
Discussion started by: Habitual
5 Replies

8. Shell Programming and Scripting

How to validate user's input..?

$Input_filename=$ARGV; if (!-d $Input_filename && ! -e $Input_filename) { print "USAGE: Please enter '$ABCD/def/dsed.txt' as an arguement \n"; exit; } 1. Input Is suppose to be something like "$ABCD/def/dsed.txt". if the input is wrong the script should throw an ERROR message.... (2 Replies)
Discussion started by: Rashid Khan
2 Replies

9. Shell Programming and Scripting

Validate input files and update

We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not.Inputfile formatsrc_sps_d_Call_Center_Reporting_yyyymmdd_01.dat SPS-Service nameYYYY-yearMM-MonthDD-dayLike above we will get n number of files for... (1 Reply)
Discussion started by: katakamvivek
1 Replies

10. Shell Programming and Scripting

Validate input files daily

We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not. Daily client will place the files in a particular path.Below files which I need to process for 04/01/2013(Load date).... (2 Replies)
Discussion started by: katakamvivek
2 Replies
oggz-validate(1)					      General Commands Manual						  oggz-validate(1)

NAME
oggz-validate -- Validate the Ogg framing of one or more files SYNOPSIS
oggz-validate [-M num | --max-errors num ] [-p | --prefix ] [-s | --suffix ] [-P | --partial ] filename ... oggz-validate [-h | --help ] [-v | --version ] Description oggz-validate validates the Ogg framing of one or more Ogg files. oggz-validate detects the following errors in Ogg framing: o File contains no Ogg packets o Packets out of order o Packet belongs to unknown serialno o Granulepos decreasing within track o Multiple bos pages o Multiple eos pages o eos marked but no bos o Missing eos packets o eos marked on page with no completed packets o Granulepos on page with no completed packets o Theora video bos page after audio bos page o Terminal header page has non-zero granulepos o Terminal header page contains non-header packet o Terminal header page contains non-header segment oggz-validate exits with status 0 if all files are valid Ogg files, and with status 1 if one or more errors are found. Options oggz-validate accepts the following options: Error reporting options -M num, --max-errors num Exit after the specified number of errors. A value of 0 specifies no maximum. -p, --prefix Treat input as the prefix of a stream; suppress warnings about missing end-of-stream markers -s, --suffix Treat input as the suffix of a stream; suppress warnings about missing beginning-of-stream markers on the first chain -P, --partial Treat input as a the middle portion of a stream. Equivalent to both --prefix and --suffix Miscellaneous options -h, --help Display usage information and exit. -v, --version Output version information and exit. AUTHOR
Conrad Parker April 3, 2005; COPYRIGHT
Copyright (C) 2005 CSIRO Australia SEE ALSO
oggz-sort(1), oggz-dump(1), oggz-info(1) oggz-validate(1)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy