#!/bin/sh if [ "$1" ] then choice="$1" else choice="$( cat <&2 printf 'choice: %s\n' "$choice" # Same on both case "$choice" in "windows") NextBoot="$(efibootmgr -u | grep 'Windows' | grep '^Boot[0-9]\{4\}' | cut -c 5-8)" expect -f - <