Whenever I need to limit the output of shell commands, I use less to paginate:
cat file_with_long_content | less
which works fine and dandy, but I wonder what works less, even if the output never ends, consider the following script in inf.sh :
while true; do date; done
then i run
sh inf.sh | less
And it can still paginate pages again, so is it right to say that the streams broadcast the result, rather than waiting for the command to complete before the result is displayed?
source share