Skip to content

Instantly share code, notes, and snippets.

@nderjung
Created April 26, 2019 15:28
Show Gist options
  • Save nderjung/014560589330260f2f6adad007f1b55c to your computer and use it in GitHub Desktop.
Save nderjung/014560589330260f2f6adad007f1b55c to your computer and use it in GitHub Desktop.
List grub entries
awk -F\' '$1=="menuentry " || $1=="submenu " {print i++ " : " $2}; /\tmenuentry / {print "\t" i-1">"j++ " : " $2};' /boot/grub/grub.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment