-1

I make some scripts to install programs automatic but is there a option to do the following.

Press Enter to continue or any other key to skip and go to the next thing? For example, the script will install keylock indicator and touchpad indicator but you want only the touchpad indicator.

Korkel
  • 1,158
  • 1
  • 10
  • 26

2 Answers2

1

You can nicely resolve this problem using a menu with select-case statement. A working example can be found here:

How can I create a select menu in a shell script?

Federico Ponzi
  • 436
  • 4
  • 10
0

I guess you're using shell script?

read -p "Install XX? [yN] " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
    # do install
fi
kraxor
  • 5,527