1

Pass output of a command as arguments to another(non-blocking)?

view story
linux-howto

http://unix.stackexchange.com – I was wondering how I can iterate over each line of the output of a command and pass it as command line arguments to another one. I want to do this in a non-blocking fashion as the output never reaches an EOF. To be more precise I want to take each line of output from acpi_listen and pass it to a user-level acpi handler script similarly to what acpid does as root(eg. "button/lid LID close" where $1="button/lid" $2=LID $3=close). (HowTos)