Disabling user input during an infinite loop in bash

前端 未结 2 554
孤街浪徒
孤街浪徒 2021-02-09 10:22

I have this bash script which basically starts the web and selenium servers with progress indicator. Since it takes some time to selenium server to start I\'m checking the statu

2条回答
  •  再見小時候
    2021-02-09 11:04

    Use stty to turn off keyboard input.

    stty -echo
    #### Ur Code here ####
    stty echo
    

    -echo turns off keyboard input and stty echo reenables keyboard input.

提交回复
热议问题