>`ls | xargs cat | my-util`
lol, this is really turning the whole 'useless use of cat' thing on its head.
lol, this is really turning the whole 'useless use of cat' thing on its head.
The problem with that example is parsing `ls` output.
`cat -- *` might be the right choice. Maybe `find . -maxdepth 1 -type f -exec cat -- {} +`
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.