Files along with their contents:-~$cat aaaaaaaaaa~$cat bbbbbbbbbb~$cat ccccccccccCommands that I need explanation:-~$cat 0< aaaaaaaaaa~$cat 0< a bbbbbbbbbb~$cat 0< a b cbbbbbbbbbcccccccccI need an explanation as to why contents of file 'a' were printed when I executed ~$cat 0< a and why the contents of file 'a' were not printed when I executed ~$cat 0< a b or ~$cat 0< a b c.
Need Explanation For Multiple Arguments And Input Redirection With Cat
io redirection;cat;file descriptors
cat reads stdin if run without arguments. If you give it arguments, it will read the arguments and not stdin.If you want it to read both its argument files and stdin, make /dev/stdin one of the arguments (according to where you want it to go in the concatenation):cat 0<a /dev/stdin b c Notes:- or /dev/fd/0 also works0< can simply be <