How do I execute a command for each line of stdin immediately?
Example:
(echo abc; sleep 10; echo def;) | ???
The xargs tool does not do the job because it blocks until it sees all the data (waits for stdout to close). Yet I have to execute commands immediately as new lines become available.