more *txt | catwould print each file name as well as the contents. But it didn't work in my default MacOS shell. This stackoverflow gave me a better idea:
grep "." *txtwhich is nice because it was leaving out the empty files - it also did the format "filename:contents" which worked ok for my needs.
Ok, not rocketscience, but a reminder that different Unix-y shells have different implementations of some basic text manipulation commands.
No comments:
Post a Comment