Remove read command

On Tue, 28 Dec 2021, 22:33 Christoph Pleger, <
[email protected]> wrote:

> Hello,
>
> intentionally, I use the search command to search for files that are
> not necessarily present, like this:
>
> if search --file --set root /EFI/debian/grubx64.efi; then
>           chainloader ($root)/EFI/debian/grubx64.efi
> elif search --file --set root /EFI/ubuntu/grubx64.efi; then
>           chainloader ($root)/EFI/ubuntu/grubx64.efi
> elif search --file --set root /EFI/Microsoft/Boot/bootmgfw.efi; then
>           chainloader ($root)/EFI/Microsoft/Boot/bootmgfw.efi
> else
>           echo "No usable bootloader file found, press <Enter> to
> reboot"
>           read
> fi
>
> Unfortunately, when a file is not found, an error message appears and a
> keystroke is expected. Is it somehow possible to suppress the error
> message and not wait for a key to be pressed?
>
> Regards
>   Christoph
>
>
>

Reply via email to