How to use cat command to merge files

Attached is a screen shot of how i am doing it but it is not working

Hey

Can you be more specific by what you mean by "not working?"

I feel compelled to ask: is there any particular reason you're shelling out to cat to do this? Why not just concatenate those files yourself? If nothing else, it'd remove the need for platform-specific code.

As for why it doesn't work, it's because you passed the glob to cat. On UNIX, programs are not responsible for handling globbing, the shell is. If you're going to do this (and please don't), you need to run cat inside a shell.

6 Likes