cat will concatenate the contents of a number of files (if more than one is specified), and then print the contents to standard output
> will cause the output of a command (which would normally go to standard output) to be redirected to a file
without the second "cat" that you prefixed filenum2 with.
While you're on you may as well learn about redirection. That would be sending the output of a command into the input of a second command using these operators ">, >>, |".
Is a powerful feature of unix shell commands.
Redirection is handled by the command shell, but most command shells will treat
As though it had been written
Which is also equivalent to
In all 3 cases, filenum1 and filenum2 data will be concatenated and output to stdout, which has been redirected to go to a file named "cat". Redirection occurs out-of-band on most shell command lines, so the exact location of the redirection elements doesn't really matter. Although for sanity's sake, we usually do it either before or (more commonly) after the actual command arguments.
And now you know where the "cat" command got its name.
Got idle CPU cycles? Join the war on COVID-19 by donating them to find the coronavirus' weak spots. folding@home Runs in the background. https://foldingathome.org
These are the worst of times and these are the best of times. And this is the best tiny ad: