as far as i learned in programming, when i want to add the input redirection to my program, i write my program as when it executed, it waits for the user's input (with std::cin or something similar). but i got confused by less command.
We all know that we can do something like this:
ls -la | less
but when we try to execute
less
without any arguments we get an error. how come ?!