|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to validate user's input..?
Code:
$Input_filename=$ARGV[0];
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. if user enters $ABCD only, error message should be displayed. if the user enters "$ABCD/def/" a error message shold be displayed. do i need any regex to check it out?? PLEASE SUGGEST..... |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
What programming/scripting language is this?
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
its perl...
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [bash] how is proper way to validate user input | makan | Shell Programming and Scripting | 2 | 09-24-2012 02:51 AM |
| Is there a simpler way to validate user input for float? | andylbh | Shell Programming and Scripting | 6 | 01-17-2011 12:34 PM |
| BASH validate user input | 602chrislys | UNIX for Dummies Questions & Answers | 2 | 07-28-2009 04:10 AM |
| validate input | DDoS | Shell Programming and Scripting | 9 | 02-07-2009 05:21 PM |
| validate input from user for file name | jerardfjay | Shell Programming and Scripting | 2 | 08-11-2005 11:53 AM |
|
|