> The problem with that example is parsing `ls` output.
Yeah, I left that alone to keep things simpler and was assuming `ls` was simply being used as short-hand for "some unspecified approach to outputting file names". In a context where hard-to-handle filenames are possible, you'd of course need to do something a little more robust.
Yes, that's what i was getting at. The use of `cat` isn't useless (for once) — the use of `ls` and `xargs` is.
so, how to avoid parsing ls? maybe use cat *, or something?
The problem with that example is parsing `ls` output.