The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 12-06-2005
blowtorch's Avatar
blowtorch blowtorch is offline
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,323
Keep the code short and simple. Bhups, you have a nice idea there, but I think it may be confusing for some (recursive code can be).
Code:
#!/usr/bin/sh
echo "Enter phone number: \c"
while read phone_no; do
        if [ -n "$phone_no" ]; then
                break
        fi
        echo "No input offered. Please enter phone number: \c"
done
Reply With Quote