TL;DR
- 기본적인 사용법은 다음과 같다:
${STDOUT} | xargs -n1 ${COMMAND}
- 예를 들면, 아래처럼 쓸 수 있고
echo "file1 file2 file3" | xargs -n1 touch
- 이것은 다음과 같다:
for f in $(echo "file1 file2 file3"); do
touch $f
done
- 그리고 이것은 결과적으로 다음처럼 작동한다:
touch file1
touch file2
touch file3
${STDOUT} | xargs -n1 ${COMMAND}
echo "file1 file2 file3" | xargs -n1 touch
for f in $(echo "file1 file2 file3"); do
touch $f
done
touch file1
touch file2
touch file3