Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Put the numeric validation in user input when value is 5.1.2.3 Post 302772760 by DGPickett on Tuesday 26th of February 2013 05:05:19 PM
Old 02-26-2013
I suppose there are ways, like writing it to a file and using findstr, escaping the dot in a class, like "\b[1-9][0-9]*[.][1-9][0-9]*[.][1-9][0-9]*[.][1-9][0-9]*\e" Microsoft Corporation

Then there are GNU tools you can install and PERL, which makes it easier.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Input validation ?

I am trying to validate user input, at the moment what i have is as below :- echo "\n\tPlease, enter package name to import: \c" read PACKAGE So far this works perfect , But if the user does not input any thing it stalls :( What I need is, If the user does not enter the name of the... (9 Replies)
Discussion started by: systemali
9 Replies

2. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

3. Shell Programming and Scripting

Numeric Validation

Hi, How to check whether an input to a shell script contain only numeric values. Is there any way to check against the following characters. & ( ) | \ " ' < > ` I've used the following way. echo $1 | grep "\{2\}$" if then (12 Replies)
Discussion started by: sumesh.abraham
12 Replies

4. Shell Programming and Scripting

Checking input for being numeric and integers

Hi, I'm trying to check to see that the arguments given to my script are both numeric and positive integers. I'm using tcsh. I figured out the positive part, but I am having trouble with the arguments being numeric and integers I have no idea where to get started with the checking them actually... (1 Reply)
Discussion started by: mistykz
1 Replies

5. Shell Programming and Scripting

Command line user input validation

Hi guys, I have a piece of snippet below which asks the user to input some numbers if isDatasubEnabled && isReconEnabled; then echo "1 = CGT, 2 = Subscriber, 3 = Order Monitor, 4 = Revaluations, 5 = Reconciliation, 6 = All, 7 = Exit" elif isDatasubEnabled &&... (4 Replies)
Discussion started by: pyscho
4 Replies

6. Shell Programming and Scripting

how to do validation the input requirement with if/else

Hello Everyone, I have the following script; ------------------------------------------------------------------ #!/bin/ksh set HSC=$1 set SEX=$2 set EXP='export ORACLE_SID=AFISDB' if ($#argv !=2); then echo Usage $0 HSC SEX else date > modify_gender_trace.txt $EXP echo... (5 Replies)
Discussion started by: wingcross
5 Replies

7. Shell Programming and Scripting

Input validation of file

Hi, I'm trying to do input validation for a file. If the user fails to enter a file name, the script should prompt for the file name or exit. I'm using this script to integrate with a bigger script which does ftp of the files which are "read". #!/bin/ksh echo "enter a file name" if then... (16 Replies)
Discussion started by: sam_bd
16 Replies

8. Windows & DOS: Issues & Discussions

Validation in user input in batch script

I need to insert the validation in my batch script.When user enter the value it should be numeric+minimum length should be 2 for e.g. 02,03 if he puts 1a,1A,2a3 t hen should print the message that it is wrong and print te message enter valid value. Echo RC is in format of 02 set /p... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

9. Shell Programming and Scripting

Check whether input is numeric

Hello there, find below for my code first: $pdp_asaba=`cat /tmp/temp_total | grep asaba | sed 's/*//g'` if ]] then pdp_asaba=0 fi $pdp_abuja=`cat /tmp/temp_total | grep abuja | sed 's/*//g'` if ]] then pdp_abuja=0 fi $pdp_ojota=`cat /tmp/temp_total | grep ojota | sed 's/*//g'` if ... (3 Replies)
Discussion started by: infinitydon
3 Replies

10. UNIX for Dummies Questions & Answers

Input Email ID Validation

Hi Experts, I've a script where users will input the email id. I want to loop the script until the user enter proper email id. Its validating for all condition and error out if any wrong data, but for one condition alone its not erroring out. Capture_EmailID() { echo -e "Please Enter... (1 Reply)
Discussion started by: senthil.ak
1 Replies
Tcl_DumpActiveMemory(3) 				      Tcl Library Procedures					   Tcl_DumpActiveMemory(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory - Validated memory allocation interface SYNOPSIS
#include <tcl.h> int Tcl_DumpActiveMemory(fileName) void Tcl_InitMemory(interp) void Tcl_ValidateAllMemory(fileName, line) ARGUMENTS
Tcl_Interp *interp (in) Tcl interpreter in which to add commands. const char *fileName (in) For Tcl_DumpActiveMemory, name of the file to which memory information will be written. For Tcl_Vali- dateAllMemory, name of the file from which the call is being made (normally __FILE__). int line (in) Line number at which the call to Tcl_ValidateAllMemory is made (normally __LINE__). _________________________________________________________________ DESCRIPTION
These functions provide access to Tcl memory debugging information. They are only functional when Tcl has been compiled with TCL_MEM_DEBUG defined at compile-time. When TCL_MEM_DEBUG is not defined, these functions are all no-ops. Tcl_DumpActiveMemory will output a list of all currently allocated memory to the specified file. The information output for each allocated block of memory is: starting and ending addresses (excluding guard zone), size, source file where ckalloc was called to allocate the block and line number in that file. It is especially useful to call Tcl_DumpActiveMemory after the Tcl interpreter has been deleted. Tcl_InitMemory adds the Tcl memory command to the interpreter given by interp. Tcl_InitMemory is called by Tcl_Main. Tcl_ValidateAllMemory forces a validation of the guard zones of all currently allocated blocks of memory. Normally validation of a block occurs when its freed, unless full validation is enabled, in which case validation of all blocks occurs when ckalloc and ckfree are called. This function forces the validation to occur at any point. SEE ALSO
TCL_MEM_DEBUG, memory KEYWORDS
memory, debug Tcl 8.1 Tcl_DumpActiveMemory(3)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy