Hey I have been researching this for a while and I was wondering if someone can explain the mechanism of this particular feature on the bash shell.
Lets say we have 3 files: test1.txt, test2.txt, and test3.txt.
Contents of each file:
test1.txt = "foo"
test2.txt = "bar"
test3.txt = "hello world"
if we run the following command on bash shell: cat < test1.txt test2.txt test3.txt we would get:
bar
hello world
My question is why the contents of test1.txt ignored in this case, and if anyone has any good sources I can read up on this particular feature.
cat [OPTION]... [FILE]..., and further down it says: With no FILE, or when FILE is -, read standard input. Hence if you had writtencat < test1.txt - test2.txt test3.txt, you would had gotten the desired result.