In Linux/Unix command line, when using a command with multiple inputs, how can I redirect one of them?
For example, say I'm using cat to concatenate multiple files, but I only want the last few lines of one file, so my inputs are testinput1, testinput2, and tail -n 4 testinput3.
How can I do this in one line without any temporary files?
I tried tail -n 4 testinput3 | cat testinput1 testinput2, but this seems to just take in input 1 and 2.
Sorry for the bad title, I wasn't sure how to phrase it exactly.
cat testinput1 testinput2 <tail -n 4 testinput3, but as expected, that told me-bash: tail: No such file or directory.<(process)cat testinput1 testinput2 < <(tail -n 4 testinput3), but that only gave me the output of the first two, just like when I tried to use piping.cat file1 file2 <(tail -n4 file3)