added windows grub reboot script

This commit is contained in:
Pim
2022-06-10 11:55:16 +02:00
committed by GitHub
parent 33c4a2665f
commit 47cb36af9b

7
windows Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
echo "Rebooting to Windows 10..."
WINDOWS_ENTRY=`sudo awk -F\' '/menuentry / {print }' /boot/grub/grub.cfg | grep -n Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` -2 ))
sudo grub-reboot $MENU_NUMBER
sudo reboot