Computer Science, asked by amitesh01kuma, 1 year ago

Difference between cat file l pr, pr

Answers

Answered by harsh1444
2

The way I understand this is that the command

cat file

will display the contents of file and

cat < file

will take the contents of file as input. I was trying this out and created two files. One called file1.txt and another one called file2.txt. In file1.txt, I wrote file2.txt, so by typing the command

cat < file1.txt

, I am expecting the content of file2.txt to be displayed; however , both cat file1.txt and cat < file1.txt are displaying the content of file1.txt. I think I am misunderstanding the definition of <

Similar questions