Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to Execute After Read?


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

    Code:
    echo 'hi' && 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 by johnywhy; 2 Weeks Ago at 02:57 AM.

  2. #2
    -->
    Solved!

    Code:
    bash -c "read -t 5 ; echo 'hi'"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •