#!/bin/sh # for each newline separated line, read from standard input and call a command with line as argument. # example: find . | nargs echo the argument is: while read line do "$@" "$line" done