When should xargs be preferred over while-read loops?
- by Charles Stewart
xargs is widely used in shell scripting; it is usually easy to recast these uses in bash using while read -r; do ... done or while read -ar; do ... done loops.
When should xargs be preferred, and when should while-read loops be preferred?