diff --git a/tpromptuser.sh b/tpromptuser.sh index df475e4..e60cce8 100755 --- a/tpromptuser.sh +++ b/tpromptuser.sh @@ -2,7 +2,7 @@ # promptuser.sh - User Prompting From Shell With validation # Copyright (c) 2010, TundraWare Inc, Des Plaines, IL USA # All Rights Reserved -# $Id: tpromptuser.sh,v 1.103 2010/10/07 18:58:50 tundra Exp $ +# $Id: tpromptuser.sh,v 1.104 2010/10/07 19:12:17 tundra Exp $ # Loop through a set of questions for the user to answer, storing # their response back into the prompt variable itself. @@ -66,6 +66,8 @@ bat="Would you like to bat?${DL}${DL}nope" +PROMPTLIST="foo bar baz bat" + # Display the records for purposes of this example only echo "Before: foo->$foo bar->$bar baz->$baz bat->$bat" @@ -78,7 +80,7 @@ ##### -for x in "foo" "bar" "baz" "bat" +for x in $PROMPTLIST do eval record=\$$x # Get the prompt record IFS=$DL # Get individual fields