Is it filename wildcard expansion possible in GRUB scripts?
Something like:
for i in directory/*; do echo $i; done
My intention is for GRUB to load different cfg files located in certain directories.
Is it filename wildcard expansion possible in GRUB scripts?
Something like:
for i in directory/*; do echo $i; done
My intention is for GRUB to load different cfg files located in certain directories.
Yes, this is possible if you have the regexp
module, which seems to use the same syntax for filename expansion as bash. I discovered this accidentally and I still am not sure if there is any mention of this feature in the documentation. Example:
insmod regexp
for i in /opt/*; do echo $i; done
I entered this into GRUB 2.02 shell on my system and received this output:
/opt/sublime_text
/opt/google
© 2022 - 2024 — McMap. All rights reserved.