How would I go about writing a while loop that says: While a username is in the /etc/passwd file, do (command)?
I'm trying to use a command such as grep -q "^{usern}:" /etc/passwd
but I'm not sure how to put that as the condition of the while loop.
问问题
1315 次