Feed a while loop with the output of a command
suggest changeThis feeds a while
loop with the output of a grep
command:
while IFS=":" read -r user _
do
# "$user" holds the username in /etc/passwd
done < <(grep "hello" /etc/passwd)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents