0

I can't figure out what this command means: ls | ./a.out

What is the "|" symbol for, and what does ls do when a file is used as a parameter instead of a directory?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Wensenz
  • 3
  • 1
  • Also [this question](https://stackoverflow.com/questions/9834086/what-is-a-simple-explanation-for-how-pipes-work-in-bash) if you want the nittry-gritty behind the scenes. – Joachim Sauer Mar 22 '23 at 14:24
  • Have a look at the [POSIX shell docs](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_02). BTW, the last sentence of your question does not make sense. Your `ls` does not get any parameter - neither file nor directory. – user1934428 Mar 23 '23 at 08:57

0 Answers0