On 14:05 18 Jul 2002, Joe Nestlerode <[EMAIL PROTECTED]> wrote: | Can you put a carriage return (enter) as one of the choices in a 'case' | construct? *) will catch it, but I need that for the "Invalid Choice" | catch-all at the end. I couldn't find it in the documentation; is this | possible?
Sure: echo "Enter your reply" read reply case "$reply" in '') # empty answer - i.e. "enter" echo "I need a response!" ;; yes) # ok? ;; *) echo "unhandled answer \"$reply\"" ;; esac Cheers, -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ Thimmonier had eighty [sewing] machines in operation, turning out military uniforms--until an angry mob, composed of professional tailors who viewed the machine as a threat to their livelihood, stormed Thimmonier's factory, destroying all the machines and nearly killing their inventor. Thimmonier fled to the town of Amplepuis, where he died in poverty. - Charles Panati _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list