[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Can someone tell me the obvious and what is wrong with this loop in bash: exists=true while [ exists==true ]; do echo "Username: " read username if (grep ^$username: /etc/passwd 1>&2 > /dev/null) ; then exists=true else exists=false fi; done No matter what it seems exists=true because the loop never exits. Thanks, -- Michelle Weber umweber@mcs.drexel.edu ______________________________________________________________________ Philadelphia Linux Users Group - http://plug.nothinbut.net Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce General Discussion - http://lists.nothinbut.net/mail/listinfo/plug