• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

How to Execute After Read?


New Member
In zsh, If i press enter before the read is finished, then the last echo command gets executed. Great!

read -t 10 && echo 'bye'
But, if i DON'T press enter, then the final echo does NOT get executed.

How can i ensure the final echo gets executed if i allow the read to finish?

Last edited:


New Member
Update, some progress:
Read may behave a bit differently in zsh.

But this doesn't work either:
bash -c "read -t 5 && echo 'bye'"

Members online

No members online now.

Latest posts