Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 0.26 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. set -e
  3.  
  4. WIN_REGEXP='Boot0*\([[:digit:]]*\)\* Windows Boot Manager$'
  5. WIN_BOOT_ENTRY=$(efibootmgr | grep -e "${WIN_REGEXP}" | head -1)
  6. WIN_BOOT_NUM=$(echo ${WIN_BOOT_ENTRY} | sed -e "s/${WIN_REGEXP}/\1/g")
  7.  
  8. efibootmgr --quiet --bootnext ${WIN_BOOT_NUM}
  9. reboot