Validating variables in shells script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Validating variables in shells script
# 1  
Old 09-23-2005
Validating variables in shells script

All

Can you help me to validate a variable only for string and digit. That is
variable should either fully alphabets or digits.

Please send me result to my mail id also: REMOVED

Thanx in advance

Regards
Deepak Xavier

Last edited by Perderabo; 09-23-2005 at 11:33 AM.. Reason: Remove email address
# 2  
Old 09-23-2005
Please read our rules:
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.

Also use our search function... ksh : find value type
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

validating(pingable or not) remote ip address in shell script

i need to verify whether the ip adress given as input to the shell script is pingable or not... that is whether the ip is alive and responding.. ping $ip_adress the above wont work in script because the execution is continuous... so the shell script keeps will dwell in this pinging process...... (8 Replies)
Discussion started by: vivek d r
8 Replies

2. Shell Programming and Scripting

Oracle environmental variables in shells script

Hi, Getting below error on executing the shell script which initiates sqlplus How to set oracle enviornment variables in the shell script ? With Regards (3 Replies)
Discussion started by: milink
3 Replies

3. Shell Programming and Scripting

Validating month value in shell script

Hi, the below script is to get & check the correct values for minutes (0-59) that is inputed by user : printf "$FBOLD\nPlease enter the minutes (0-59): $FREG" read MIN case "$MIN" in |) break 2;; *) echo "" echo "Invalid minutes, please... (4 Replies)
Discussion started by: milink
4 Replies

4. Shell Programming and Scripting

Shell script for validating fields in a file

Hi, I have not used Unix in a very long time and I am very rusty. I would appreciate any help I can get from the more experienced and experts in Shell script. I am reading one file at a time from a folder. The file is a flat file with no delimeters or carriage return. Col1 through col6 is... (5 Replies)
Discussion started by: asemota
5 Replies

5. Shell Programming and Scripting

Using different shells in one script

Hi, Is it possible to use multiple shells in one script. There are sometimes we need to club shell specific commands in single script. for example in bash mode we use -e with echo to use Escape sequence but in ksh it is not required. How to tell a UNIX command to run in a specific shell. ... (2 Replies)
Discussion started by: sanjay1979
2 Replies

6. Shell Programming and Scripting

Unix Script for getting date and validating just Hour

Hi, Can someone guide me to write a unix script for getting a hour out of a date command and validating hour to see if its > 7 and < 16. if hours is >7 and <16 then assign a variable value of 0730 and if hour is >16 then assign a variable value of 1630? Help appreciated. Thanks in advance.... (9 Replies)
Discussion started by: zulfikarmd
9 Replies

7. Shell Programming and Scripting

Can any one share a unix script for validating the export of a mapping which is in XM

Hi, Can any one share a unix script for validating the export of a mapping which is in XML format. like my requirment is that when ever we are migrating the mappings or wokflows from development to QA we will take the export of that mapping into an XML file.Insted of reviewing the mapping... (1 Reply)
Discussion started by: perlamohan
1 Replies

8. UNIX for Advanced & Expert Users

Can any one share a unix script for validating the export of a mapping which is in XM

Hi, Can any one share a unix script for validating the export of a mapping which is in XML format. like my requirment is that when ever we are migrating the mappings or wokflows from development to QA we will take the export of that mapping into an XML file.Insted of reviewing the mapping... (1 Reply)
Discussion started by: perlamohan
1 Replies

9. UNIX for Dummies Questions & Answers

Passing environment variables to parent shells

Hi, I am using bash and need to run a set of tcsh scripts that set environment variables. Is there a way to do this? Any help greatly appreciated. (3 Replies)
Discussion started by: konndanley
3 Replies

10. Shell Programming and Scripting

validating variables (numeric)

Hi I need to get a user to enter a number (an exchange rate) into a script. I have the following: #!/bin/ksh echo "Enter exchange rate:" read EX_RATE if \"`" ] then echo "Well done - only numeric here" else echo "Not so well done - there is NON numeric stuff here!" fi This works... (3 Replies)
Discussion started by: pjd1
3 Replies
Login or Register to Ask a Question