I'm trying to display progress, and make it usable under
while true; do echo -n .; sleep 1; done | less
Is there a way to make it work?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The output from the
echo in the
while loop is always unbuffered. If you remove the
-n option, you will see the lines containing the dots appearing each second.
It seems that
less always tries to read a complete line and won't display it until it reaches end of line or end of file. There doesn't seem to be an option to change that.