• 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?

johnywhy

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

Code:
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?

thx
 
Last edited:


johnywhy

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

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


Members online


Latest posts

Top