Horje
yes no Code Example
yes no
inquire ()  {
  echo  -n "$1 [y/n]? "
  read answer
  finish="-1"
  while [ "$finish" = '-1' ]
  do
    finish="1"
    if [ "$answer" = '' ];
    then
      answer=""
    else
      case $answer in
        y | Y | yes | YES ) answer="y";;
        n | N | no | NO ) answer="n";;
        *) finish="-1";
           echo -n 'Invalid response -- please reenter:';
           read answer;;
       esac
    fi
  done
}

... other stuff

inquire "Install now?"

...




Shell

Related
linux poweroff command Code Example linux poweroff command Code Example
mpi installation in linux Code Example mpi installation in linux Code Example
create next app with jest Code Example create next app with jest Code Example
ansible Permission denied (publickey,password). Code Example ansible Permission denied (publickey,password). Code Example
def_daemon[19685]: segfault at 7f4d6811b7f0 ip 00007f4d6811b7f0 sp 00007f4d65bcc808 error 15 Code Example def_daemon[19685]: segfault at 7f4d6811b7f0 ip 00007f4d6811b7f0 sp 00007f4d65bcc808 error 15 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10