![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with stack overflow | karthikb23 | HP-UX | 0 | 03-26-2008 01:02 AM |
| SCO Openserver 5.0.7 Process table overflow | josramon | UNIX for Dummies Questions & Answers | 0 | 08-29-2005 11:52 AM |
| KSH arithmatic Integer overflow | vikas_sri | Shell Programming and Scripting | 2 | 04-02-2004 09:52 PM |
| Line overflow?? | Peterh | UNIX for Dummies Questions & Answers | 12 | 04-17-2002 04:25 AM |
| Printer buffer overflow | AltatemTC | UNIX for Dummies Questions & Answers | 3 | 02-02-2002 10:28 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
How not to let field overflow ?
Hi All
I ahve a basic script with a screen. Is there anyway that I can make it possible for the user not to type over the ] ie I would like the inpu to be only with the brakcets? Any suggestions welcome. eg Code:
DB name:[ ]
function get_fdb {
while [[ 1 -eq 1 ]]
do
tput cup 9 41
read FDB
if [[ -n $FDB ]]
then
chkdb ${FDB}
if [[ $? -eq 0 ]]
then
break
else
disperr "From DB does not exist" 1
fi
fi
done
}
Last edited by Yogesh Sawant; 04-17-2008 at 08:29 AM. Reason: added code tags |
| Forum Sponsor | ||
|
|
|
|||
|
how about a different approach...
simple answer is no!
you could write a script that 1)asks the user to input values for each parameter one by one 2)then recreates the aforementioned file with the user input values - that way they don't even have to open the file in the first place - which is a better way of ensuring that noone trashes the file |
|||
| Google UNIX.COM |