LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LQ Articles Discussion (http://www.linuxquestions.org/questions/lq-articles-discussion-68/)
-   -   DISCUSSION: Power to the Users - Part 4 (http://www.linuxquestions.org/questions/lq-articles-discussion-68/discussion-power-to-the-users-part-4-a-423249/)

stomfi 03-09-2006 02:34 PM

DISCUSSION: Power to the Users - Part 4
 
This thread is to discuss the article titled:
Power to the Users - Part 4

Quote:

Power to the Users. Shell Scripting & GUI interfacing for Desktop Users By Stomfi 2006 Part 4 - Validation, Editing and Dialog Windowing Validation Adding validation to input scripts is used to make sure the user doesn't enter something unwanted. Simple validation was already used in the while loops to make sure the user entered at least one character when the names were input with the test construct:
Code:

[ ${#Varname} -lt 1 ]
which tests for the number of characters in Varname, and returns "true" if there are none. The simple input script doesn't test that the user entered only one name, which is what we want, although it could be a hyphenated name, which is OK.


All times are GMT -5. The time now is 08:13 AM.